If a word is longer than CAMEL_TEXT_INDEX_MAX_WORDLEN, then ignore it.
2003-10-24 Jeffrey Stedfast <fejj@ximian.com> * camel-text-index.c (text_index_name_add_buffer): If a word is longer than CAMEL_TEXT_INDEX_MAX_WORDLEN, then ignore it. This fixes bug #50096. svn path=/trunk/; revision=23091
This commit is contained in:

committed by
Jeffrey Stedfast

parent
81a6d7f5fe
commit
779d9a48b8
@ -1,3 +1,9 @@
|
||||
2003-10-24 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* camel-text-index.c (text_index_name_add_buffer): If a word is
|
||||
longer than CAMEL_TEXT_INDEX_MAX_WORDLEN, then ignore it. This
|
||||
fixes bug #50096.
|
||||
|
||||
2003-10-23 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* *.c: Removed unneeded CAMEL_OBJECT() casts.
|
||||
|
@ -53,6 +53,8 @@
|
||||
/* cursor debug */
|
||||
#define c(x)
|
||||
|
||||
#define CAMEL_TEXT_INDEX_MAX_WORDLEN (36)
|
||||
|
||||
#define CAMEL_TEXT_INDEX_LOCK(kf, lock) (e_mutex_lock(((CamelTextIndex *)kf)->priv->lock))
|
||||
#define CAMEL_TEXT_INDEX_UNLOCK(kf, lock) (e_mutex_unlock(((CamelTextIndex *)kf)->priv->lock))
|
||||
|
||||
@ -1465,11 +1467,12 @@ text_index_name_add_buffer(CamelIndexName *idn, const char *buffer, size_t len)
|
||||
utf8[utf8len] = 0;
|
||||
g_string_append(p->buffer, utf8);
|
||||
} else {
|
||||
if (p->buffer->len) {
|
||||
if (p->buffer->len > 0 && p->buffer->len <= CAMEL_TEXT_INDEX_MAX_WORDLEN) {
|
||||
text_index_name_add_word(idn, p->buffer->str);
|
||||
/*camel_index_name_add_word(idn, p->buffer->str);*/
|
||||
g_string_truncate(p->buffer, 0);
|
||||
}
|
||||
|
||||
g_string_truncate (p->buffer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user