summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-12-14 13:41:56 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-14 13:41:56 +0800
commit20cef0cea7407e95daedc36c612dfcfa8339b48d (patch)
tree3fb33e2cf1b5743b7b5ca819084c32b0b1b2ef33
parent9ffdfaa1b77c0a9e2136ad49768bc7df4329d454 (diff)
downloadlibpinyin-20cef0cea7407e95daedc36c612dfcfa8339b48d.zip
libpinyin-20cef0cea7407e95daedc36c612dfcfa8339b48d.tar.gz
libpinyin-20cef0cea7407e95daedc36c612dfcfa8339b48d.tar.xz
fixes phrase index
-rw-r--r--src/storage/phrase_index.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index 294cd00..9fec159 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -476,8 +476,8 @@ bool FacadePhraseIndex::load_text(guint8 phrase_index, FILE * infile){
parser.parse(options, keys, key_rests, pinyin, strlen(pinyin));
- assert(item_ptr->get_phrase_length() == keys->len);
- item_ptr->append_pronunciation((ChewingKey *)keys->data, freq);
+ if (item_ptr->get_phrase_length() == keys->len)
+ item_ptr->append_pronunciation((ChewingKey *)keys->data, freq);
g_array_free(keys, TRUE);
g_array_free(key_rests, TRUE);