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
Subproject commit fd86bf7d44b0c970771830692ae7491447ebe8b1
Subproject commit 42f4712085b40173eaea58e14b1a579291a6fe3a
......
......@@ -99,7 +99,11 @@ void
mu_sieve_value_get (mu_sieve_machine_t mach, mu_sieve_value_t *val,
mu_sieve_data_type type, void *ret)
{
if (val->type != type)
if (val->type == SVT_STRING && type == SVT_STRING_LIST)
/* compatible types; note that the operation is not commutative: it's
OK if actual type is single string and string list is expected, but
not vice-versa. */;
else if (val->type != type)
{
if (val->tag)
mu_sieve_error (mach,
......