From 265a52daadea1a065f0e6cdb39d3f5543ce255a8 Mon Sep 17 00:00:00 2001 From: Alban Crequy Date: Mon, 12 Apr 2010 19:04:45 +0300 Subject: Don't give up search when there is a '\n' in the haystack Signed-off-by: Claudio Saavedra --- hildon/hildon-helper.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hildon/hildon-helper.c b/hildon/hildon-helper.c index 15f0c5e..9687e95 100644 --- a/hildon/hildon-helper.c +++ b/hildon/hildon-helper.c @@ -610,7 +610,7 @@ get_next (const gchar *p, gunichar *out, gboolean separators) q = p; p = e_util_unicode_get_utf8 (q, &utf8); *out = stripped_char (utf8); - } while (p && *out && !g_unichar_isalnum (*out)); + } while (p && !g_unichar_isalnum (*out)); } else { p = e_util_unicode_get_utf8 (p, &utf8); *out = stripped_char (utf8); @@ -669,7 +669,11 @@ hildon_helper_utf8_strstrcasedecomp_needle_stripped (const gchar *haystack, cons gint npos = 1; while (npos < nlen) { q = e_util_unicode_get_utf8 (q, &unival); - if (!q || !unival) return NULL; + if (!q) return NULL; + if (!unival) { + npos++; + continue; + } sc = stripped_char (unival); if ((!sc) || (sc != nuni[npos])) break; npos++; -- cgit v1.2.3-18-g5258