fixes phrase index
authorPeng Wu <alexepico@gmail.com>
Wed, 14 Dec 2011 05:41:56 +0000 (13:41 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 14 Dec 2011 05:41:56 +0000 (13:41 +0800)
src/storage/phrase_index.cpp

index 294cd00..9fec159 100644 (file)
@@ -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);