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:16:57 +0800
commitfc5f2499c33c71df6c828a6527685f056a53d424 (patch)
tree9463c184179f053eea1d039e26aba1bb53504b33
parent02a72ed015fe1ede3a718013231e4c3e20f29426 (diff)
downloadlibpinyin-fc5f2499c33c71df6c828a6527685f056a53d424.zip
libpinyin-fc5f2499c33c71df6c828a6527685f056a53d424.tar.gz
libpinyin-fc5f2499c33c71df6c828a6527685f056a53d424.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;
}
}