diff options
author | Peng Wu <alexepico@gmail.com> | 2015-10-17 11:38:00 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-10-17 11:38:00 +0800 |
commit | 46e538b87c97b33545a951b49133bdb34bb9206d (patch) | |
tree | cb1094c9a4d88db1059a8c0e2f3589874fac1568 /src/storage/zhuyin_parser2.cpp | |
parent | 69aeaf03a8b0694269108a7a2d4297b7ddec289f (diff) | |
download | libpinyin-46e538b87c97b33545a951b49133bdb34bb9206d.tar.gz libpinyin-46e538b87c97b33545a951b49133bdb34bb9206d.tar.xz libpinyin-46e538b87c97b33545a951b49133bdb34bb9206d.zip |
fixes ZhuyinSimpleParser2::in_chewing_schem method
Diffstat (limited to 'src/storage/zhuyin_parser2.cpp')
-rw-r--r-- | src/storage/zhuyin_parser2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/storage/zhuyin_parser2.cpp b/src/storage/zhuyin_parser2.cpp index 5788db8..9047947 100644 --- a/src/storage/zhuyin_parser2.cpp +++ b/src/storage/zhuyin_parser2.cpp @@ -310,8 +310,10 @@ bool ZhuyinSimpleParser2::in_chewing_scheme(pinyin_option_t options, return true; } - if (!(options & USE_TONE)) + if (!(options & USE_TONE)) { + g_ptr_array_free(array, TRUE); return false; + } if (search_chewing_tones(m_tone_table, key, &tone)) { g_ptr_array_add(array, g_strdup(chewing_tone_table[tone])); @@ -321,6 +323,7 @@ bool ZhuyinSimpleParser2::in_chewing_scheme(pinyin_option_t options, return true; } + g_ptr_array_free(array, TRUE); return false; } |