diff options
author | Peng Wu <alexepico@gmail.com> | 2011-11-28 17:41:03 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-11-28 17:41:03 +0800 |
commit | d685c3add83239b70b8ed00408ac1613a9a654cb (patch) | |
tree | 785a191ed11287521c213fc1ae625087acf937f4 | |
parent | bcd0f502f7867dd7d1698b0101c4eab73ce686b8 (diff) | |
download | libpinyin-d685c3add83239b70b8ed00408ac1613a9a654cb.tar.gz libpinyin-d685c3add83239b70b8ed00408ac1613a9a654cb.tar.xz libpinyin-d685c3add83239b70b8ed00408ac1613a9a654cb.zip |
fixes chewing parser2
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 1e67aed..fcfa72f 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -601,6 +601,7 @@ bool DoublePinyinParser2::set_scheme(DoublePinyinScheme scheme) { /* the chewing string must be freed with g_free. */ static bool search_chewing_symbols(const chewing_symbol_item_t * symbol_table, const char key, char ** chewing) { + *chewing = NULL; /* just iterate the table, as we only have < 50 items. */ while (symbol_table->m_input != '\0') { if (symbol_table->m_input == key) { @@ -614,6 +615,7 @@ static bool search_chewing_symbols(const chewing_symbol_item_t * symbol_table, static bool search_chewing_tones(const chewing_tone_item_t * tone_table, const char key, char * tone) { + *tone = CHEWING_ZERO_TONE; /* just iterate the table, as we only have < 10 items. */ while (tone_table->m_input != '\0') { if (tone_table->m_input == key) { |