libmu_sieve: minor fix
* libmu_sieve/util.c (mu_sieve_value_get): Treat actual string and expected string list as equivalent types.
Showing
2 changed files
with
6 additions
and
2 deletions
gint @ 42f47120
... | @@ -99,7 +99,11 @@ void | ... | @@ -99,7 +99,11 @@ void |
99 | mu_sieve_value_get (mu_sieve_machine_t mach, mu_sieve_value_t *val, | 99 | mu_sieve_value_get (mu_sieve_machine_t mach, mu_sieve_value_t *val, |
100 | mu_sieve_data_type type, void *ret) | 100 | mu_sieve_data_type type, void *ret) |
101 | { | 101 | { |
102 | if (val->type != type) | 102 | if (val->type == SVT_STRING && type == SVT_STRING_LIST) |
103 | /* compatible types; note that the operation is not commutative: it's | ||
104 | OK if actual type is single string and string list is expected, but | ||
105 | not vice-versa. */; | ||
106 | else if (val->type != type) | ||
103 | { | 107 | { |
104 | if (val->tag) | 108 | if (val->tag) |
105 | mu_sieve_error (mach, | 109 | mu_sieve_error (mach, | ... | ... |
-
Please register or sign in to post a comment