summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r--src/storage/pinyin_parser2.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index c4972a5..df17a11 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -736,19 +736,20 @@ bool DoublePinyinParser2::parse_one_key(pinyin_option_t options,
/* support fallback table for double pinyin. */
if (m_fallback_table) {
- input = g_strndup(str, 2);
+ gchar * input = g_strndup(str, 2);
const char * yunmu = NULL;
const double_pinyin_scheme_fallback_item_t * item =
m_fallback_table;
+ /* as the fallback table is short, just iterate the table. */
while(NULL != item->m_input) {
if (0 == strcmp(item->m_input, input))
- yummu = item->m_yunmu;
+ yunmu = item->m_yunmu;
item++;
}
- if (NULL != yummu && search_pinyin_index(options, yummu, key)) {
+ if (NULL != yunmu && search_pinyin_index(options, yunmu, key)) {
key.m_tone = tone;
g_free(input);
return true;