diff options
author | Peng Wu <alexepico@gmail.com> | 2015-10-13 16:57:46 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-10-13 16:57:46 +0800 |
commit | 31695561f476e98f64aeb447b45de0a03b5fce86 (patch) | |
tree | 36de1c459c96c6f6a063c7e8b62eeb31aeb89cb9 /src/storage/pinyin_parser2.cpp | |
parent | 6608b8f6fb6c7c49536d10d64ac8e0d8b2e589e6 (diff) | |
download | libpinyin-31695561f476e98f64aeb447b45de0a03b5fce86.tar.gz libpinyin-31695561f476e98f64aeb447b45de0a03b5fce86.tar.xz libpinyin-31695561f476e98f64aeb447b45de0a03b5fce86.zip |
fixes a typo
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 7 |
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; |