diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 6 | ||||
-rw-r--r-- | e-util/e-trie.c | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 1c33787545..b50e807ecc 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,9 @@ +2003-02-11 Not Zed <NotZed@Ximian.com> + + * e-trie.c (trie_utf8_getc): Instead of simply ignoring bad chars, + return the sentinal invalid char 0xfffe, so that we properly track + the start of sequences. + 2003-02-10 Ettore Perazzoli <ettore@ximian.com> * Makefile.am (libeutil_static_la_DEPENDENCIES): Make diff --git a/e-util/e-trie.c b/e-util/e-trie.c index da1a162115..307cb3ec95 100644 --- a/e-util/e-trie.c +++ b/e-util/e-trie.c @@ -82,10 +82,8 @@ loop: return 0; c = *inptr++; - if ((c & 0xc0) != 0x80) { - r = c; - goto loop; - } + if ((c & 0xc0) != 0x80) + goto error; u = (u << 6) | (c & 0x3f); r <<= 1; @@ -96,7 +94,9 @@ loop: u &= ~m; } else { - goto again; + error: + *in = (*in)+1; + u = 0xfffe; } return u; |