summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-10-13 16:57:46 +0800
committerPeng Wu <alexepico@gmail.com>2015-10-13 16:57:46 +0800
commit31695561f476e98f64aeb447b45de0a03b5fce86 (patch)
tree36de1c459c96c6f6a063c7e8b62eeb31aeb89cb9
parent6608b8f6fb6c7c49536d10d64ac8e0d8b2e589e6 (diff)
downloadlibpinyin-31695561f476e98f64aeb447b45de0a03b5fce86.tar.gz
libpinyin-31695561f476e98f64aeb447b45de0a03b5fce86.tar.xz
libpinyin-31695561f476e98f64aeb447b45de0a03b5fce86.zip
fixes a typo
-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;