From f0f32b8e86014a9173a25c01c333118392eb7004 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 9 Jun 2015 10:44:01 +0800 Subject: fixes a bug --- src/storage/phrase_index.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp index b851a72..ede3cac 100644 --- a/src/storage/phrase_index.cpp +++ b/src/storage/phrase_index.cpp @@ -556,7 +556,7 @@ bool FacadePhraseIndex::load_text(guint8 phrase_index, FILE * infile){ item_ptr->set_phrase_string(written, phrase_ucs4); } - pinyin_option_t options = USE_TONE; + pinyin_option_t options = USE_TONE; FullPinyinParser2 parser; ChewingKeyVector keys = g_array_new(FALSE, FALSE, sizeof(ChewingKey)); ChewingKeyRestVector key_rests = @@ -623,7 +623,7 @@ int SubPhraseIndex::get_range(/* out */ PhraseIndexRange & range){ /* remove trailing zeros. */ const table_offset_t * poffset = NULL; - for (poffset = end; poffset > begin; --poffset) { + for (poffset = end; poffset > begin + 1; --poffset) { if (NULL != *(poffset - 1)) break; } -- cgit