fixes full pinyin parser2
authorPeng Wu <alexepico@gmail.com>
Thu, 12 Jan 2012 08:16:57 +0000 (16:16 +0800)
committerPeng Wu <alexepico@gmail.com>
Thu, 12 Jan 2012 08:16:57 +0000 (16:16 +0800)
src/storage/pinyin_parser2.cpp

index ceea641..081b069 100644 (file)
@@ -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;
             }
         }