diff options
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-folder-search.c | 27 |
2 files changed, 16 insertions, 16 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index e2d39d4a7b..9b22d11fe9 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2003-03-24 Jeffrey Stedfast <fejj@ximian.com> + + * camel-folder-search.c (search_user_tag): This expression can + never return an array. We must always return a string value. + 2003-03-24 Timo Sirainen <tss@iki.fi> * camel-imap-command.c (imap_read_untagged) Integer overflow fix. diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c index ef6dfc8564..00315fafdc 100644 --- a/camel/camel-folder-search.c +++ b/camel/camel-folder-search.c @@ -1052,25 +1052,20 @@ search_system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, Came return r; } -static ESExpResult *search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search) +static ESExpResult * +search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search) { + const char *value = NULL; ESExpResult *r; - + r(printf("executing user-tag\n")); - - /* are we inside a match-all? */ - if (search->current) { - const char *value = NULL; - if (argc == 1) { - value = camel_tag_get(&search->current->user_tags, argv[0]->value.string); - } - r = e_sexp_result_new(f, ESEXP_RES_STRING); - r->value.string = g_strdup(value?value:""); - } else { - r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR); - r->value.ptrarray = g_ptr_array_new(); - } - + + if (argc == 1) + value = camel_tag_get (&search->current->user_tags, argv[0]->value.string); + + r = e_sexp_result_new(f, ESEXP_RES_STRING); + r->value.string = g_strdup (value ? value : ""); + return r; } |