projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b4d5c6
)
clean up parse_one_key in full pinyin parser2
author
Peng Wu
<alexepico@gmail.com>
Mon, 5 Dec 2011 07:47:48 +0000
(15:47 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Mon, 5 Dec 2011 07:47:48 +0000
(15:47 +0800)
src/storage/pinyin_parser2.cpp
patch
|
blob
|
history
diff --git
a/src/storage/pinyin_parser2.cpp
b/src/storage/pinyin_parser2.cpp
index
7e98b4d
..
727dc28
100644
(file)
--- a/
src/storage/pinyin_parser2.cpp
+++ b/
src/storage/pinyin_parser2.cpp
@@
-217,8
+217,10
@@
bool FullPinyinParser2::parse_one_key (pinyin_option_t options, ChewingKey & key
/* Note: optimize here? */
input[parsed_len] = '\0';
- if (!search_pinyin_index(options, input, key, key_rest))
- --parsed_len;
+ if (!search_pinyin_index(options, input, key, key_rest)) {
+ g_free(input);
+ return false;
+ }
if (options & USE_TONE) {
/* post processing tone. */