From 8435ad3d2db7d4cb0cbed199cd58ef0a5e0ae366 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 21 May 2002 02:50:02 +0000 Subject: If we get an invalid start char, just ignore it and goto the next 2002-05-18 Not Zed * camel-search-private.c (camel_utf8_getc): If we get an invalid start char, just ignore it and goto the next character. svn path=/trunk/; revision=16960 --- camel/ChangeLog | 5 +++++ camel/camel-search-private.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index b25215bd99..7caa2a9cee 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2002-05-18 Not Zed + + * camel-search-private.c (camel_utf8_getc): If we get an invalid + start char, just ignore it and goto the next character. + 2002-05-16 Jeffrey Stedfast * camel-filter-search.c (get_label): New e-sexp callback function diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c index 7e8553cd35..5adf2b146f 100644 --- a/camel/camel-search-private.c +++ b/camel/camel-search-private.c @@ -499,9 +499,9 @@ camel_utf8_getc(const unsigned char **ptr) { register unsigned char *p = (unsigned char *)*ptr; register unsigned char c, r; - register guint32 v=0, /* this is only required because the stupid @@@%#%# compiler thinks it can be used uninitialised */ - m; + register guint32 v, m; +again: r = *p++; loop: if (r < 0x80) { @@ -524,6 +524,8 @@ loop: *ptr = p; v &= ~m; + } else { + goto again; } return v; -- cgit v1.2.3