aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-21 03:06:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-21 03:06:49 +0800
commit8d9be87caabc2548b11548eeb4697683394301a7 (patch)
tree5caff1dc1e9eb925a052851d428e619c2e011f13
parentd7f89b244f8df95dc3f5ca6fbfc39f99db9a2659 (diff)
downloadgsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.tar
gsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.tar.gz
gsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.tar.bz2
gsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.tar.lz
gsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.tar.xz
gsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.tar.zst
gsoc2013-evolution-8d9be87caabc2548b11548eeb4697683394301a7.zip
If the gunichar is 0xfffe, just skip processing it. Maybe this will fix
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. svn path=/trunk/; revision=20436
-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;
+ }
}
}