Commit 985be0a2 985be0a2ebef0671c1eee2f160c8c366e806316e by Sergey Poznyakoff

libmu_sieve: minor fix

* libmu_sieve/util.c (mu_sieve_value_get): Treat actual string
and expected string list as equivalent types.
1 parent eef0d16d
gint @ 42f47120
1 Subproject commit fd86bf7d44b0c970771830692ae7491447ebe8b1 1 Subproject commit 42f4712085b40173eaea58e14b1a579291a6fe3a
......
...@@ -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,
......