From d685c3add83239b70b8ed00408ac1613a9a654cb Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 28 Nov 2011 17:41:03 +0800 Subject: fixes chewing parser2 --- src/storage/pinyin_parser2.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit