diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-03-21 03:06:49 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-03-21 03:06:49 +0800 |
commit | 8d9be87caabc2548b11548eeb4697683394301a7 (patch) | |
tree | 5caff1dc1e9eb925a052851d428e619c2e011f13 /e-util | |
parent | d7f89b244f8df95dc3f5ca6fbfc39f99db9a2659 (diff) | |
download | gsoc2013-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
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-trie.c | 38 |
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; + } } } |