aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-trie.c38
2 files changed, 25 insertions, 18 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 73c2d16380..1eac6aed90 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-trie.c (e_trie_search): If the gunichar is 0xfffe, just skip
+ processing it. Maybe this will fix bug #39900.
+
2003-03-19 Jeffrey Stedfast <fejj@ximian.com>
* e-sexp.h: Fix ESExpClass to never be an empty struct. Also make
diff --git a/e-util/e-trie.c b/e-util/e-trie.c
index c0e4f49487..8a9600e6db 100644
--- a/e-util/e-trie.c
+++ b/e-util/e-trie.c
@@ -314,26 +314,28 @@ e_trie_search (ETrie *trie, const char *buffer, size_t buflen, int *matched_id)
while ((c = trie_utf8_getc (&inptr, inlen))) {
inlen = (inend - inptr);
- if (trie->icase)
- c = g_unichar_tolower (c);
-
- while (q != NULL && (m = g (q, c)) == NULL)
- q = q->fail;
-
- if (q == &trie->root)
- pat = prev;
-
- if (q == NULL) {
- q = &trie->root;
- pat = inptr;
- } else if (m != NULL) {
- q = m->state;
+ if (c != 0xfffe) {
+ if (trie->icase)
+ c = g_unichar_tolower (c);
+
+ while (q != NULL && (m = g (q, c)) == NULL)
+ q = q->fail;
- if (q->final) {
- if (matched_id)
- *matched_id = q->id;
+ if (q == &trie->root)
+ pat = prev;
+
+ if (q == NULL) {
+ q = &trie->root;
+ pat = inptr;
+ } else if (m != NULL) {
+ q = m->state;
- return (const char *) pat;
+ if (q->final) {
+ if (matched_id)
+ *matched_id = q->id;
+
+ return (const char *) pat;
+ }
}
}