From 31695561f476e98f64aeb447b45de0a03b5fce86 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 13 Oct 2015 16:57:46 +0800 Subject: fixes a typo --- src/storage/pinyin_parser2.cpp | 7 ++++--- 1 file 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; -- cgit