aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Crequy <alban.crequy@collabora.co.uk>2010-04-12 19:04:45 +0300
committerClaudio Saavedra <csaavedra@igalia.com>2010-04-12 19:04:45 +0300
commit265a52daadea1a065f0e6cdb39d3f5543ce255a8 (patch)
treec0cbb832464199ef27da6af5659fde980942d2c8
parent2549669c779f4fa8c568c888afac6e8ca2700a2f (diff)
Don't give up search when there is a '\n' in the haystack
Signed-off-by: Claudio Saavedra <csaavedra@igalia.com>
-rw-r--r--hildon/hildon-helper.c8
1 files 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++;