summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-01-12 16:16:57 +0800
committerPeng Wu <alexepico@gmail.com>2012-01-12 16:17:51 +0800
commit5a1c7d65d300fcb3e92a793ec0d99c5dc762ed24 (patch)
treee85cac3b2772e3789a838c34417f271c37614435
parent598c2775382c2190a98bcad5da567a14a972ece4 (diff)
downloadlibpinyin-5a1c7d65d300fcb3e92a793ec0d99c5dc762ed24.zip
libpinyin-5a1c7d65d300fcb3e92a793ec0d99c5dc762ed24.tar.gz
libpinyin-5a1c7d65d300fcb3e92a793ec0d99c5dc762ed24.tar.xz
fixes full pinyin parser2
-rw-r--r--src/storage/pinyin_parser2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index ceea641..081b069 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -379,8 +379,10 @@ int FullPinyinParser2::parse (pinyin_option_t options, ChewingKeyVector & keys,
if (value.m_parsed_len == nextstep->m_parsed_len &&
value.m_num_keys < nextstep->m_num_keys)
*nextstep = value;
- if (nextstep->m_key.m_initial == CHEWING_ZERO_INITIAL &&
- value.m_key.m_initial != CHEWING_ZERO_INITIAL)
+ if (value.m_parsed_len == nextstep->m_parsed_len &&
+ value.m_num_keys == nextstep->m_num_keys &&
+ value.m_key.m_initial != CHEWING_ZERO_INITIAL &&
+ nextstep->m_key.m_initial == CHEWING_ZERO_INITIAL)
*nextstep = value;
}
}