From 5a1c7d65d300fcb3e92a793ec0d99c5dc762ed24 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 12 Jan 2012 16:16:57 +0800 Subject: fixes full pinyin parser2 --- src/storage/pinyin_parser2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/storage/pinyin_parser2.cpp') 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; } } -- cgit