diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2016-12-13 20:08:11 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-12-13 20:11:32 +0200 |
commit | 985be0a2ebef0671c1eee2f160c8c366e806316e (patch) | |
tree | 1ccec9faef4050ad91f863fecf8b42dcdb70edb8 | |
parent | eef0d16dc96ab8570c8da92283c81408c63edcee (diff) | |
download | mailutils-985be0a2ebef0671c1eee2f160c8c366e806316e.tar.gz mailutils-985be0a2ebef0671c1eee2f160c8c366e806316e.tar.bz2 |
libmu_sieve: minor fix
* libmu_sieve/util.c (mu_sieve_value_get): Treat actual string
and expected string list as equivalent types.
m--------- | gint | 0 | ||||
-rw-r--r-- | libmu_sieve/util.c | 6 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gint b/gint -Subproject fd86bf7d44b0c970771830692ae7491447ebe8b +Subproject 42f4712085b40173eaea58e14b1a579291a6fe3 diff --git a/libmu_sieve/util.c b/libmu_sieve/util.c index 9a0b7dbf0..ae46d5231 100644 --- a/libmu_sieve/util.c +++ b/libmu_sieve/util.c @@ -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, |