summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-06-09 10:44:01 +0800
committerPeng Wu <alexepico@gmail.com>2015-06-09 10:44:01 +0800
commitf0f32b8e86014a9173a25c01c333118392eb7004 (patch)
tree4556d9f2068852035c4ac04744e4b8a251667295
parent1b21bea5dd6acd635af7d981b2b8a8763e070fdd (diff)
downloadlibpinyin-f0f32b8e86014a9173a25c01c333118392eb7004.tar.gz
libpinyin-f0f32b8e86014a9173a25c01c333118392eb7004.tar.xz
libpinyin-f0f32b8e86014a9173a25c01c333118392eb7004.zip
fixes a bug
-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 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;
}