diff options
Diffstat (limited to 'camel/camel-search-private.c')
-rw-r--r-- | camel/camel-search-private.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c index a288e91ca6..a6a87c0728 100644 --- a/camel/camel-search-private.c +++ b/camel/camel-search-private.c @@ -247,8 +247,11 @@ camel_ustrstrcase (const char *haystack, const char *needle) g_return_val_if_fail (haystack != NULL, NULL); g_return_val_if_fail (needle != NULL, NULL); - g_return_val_if_fail (strlen (needle) != 0, haystack); - g_return_val_if_fail (strlen (haystack) != 0, NULL); + + if (strlen(needle) == 0) + return haystack; + if (strlen(haystack) == 0) + return NULL; puni = nuni = alloca (sizeof (unicode_char_t) * strlen (needle)); |