diff options
author | Peng Wu <alexepico@gmail.com> | 2016-06-08 16:50:30 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-06-08 16:50:30 +0800 |
commit | 967e2d308d6e3cf86257e7034e9067b0aee9b705 (patch) | |
tree | 97e08c49a690adcd1e84e90c9ea0677a3f9a38cb /src | |
parent | 6e34fc28308ff301710af6608628857c78ab2cb4 (diff) | |
download | libpinyin-967e2d308d6e3cf86257e7034e9067b0aee9b705.tar.gz libpinyin-967e2d308d6e3cf86257e7034e9067b0aee9b705.tar.xz libpinyin-967e2d308d6e3cf86257e7034e9067b0aee9b705.zip |
fixes a typo
Diffstat (limited to 'src')
-rw-r--r-- | src/pinyin.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index a79bc2b..9541153 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -1752,18 +1752,16 @@ bool pinyin_guess_candidates(pinyin_instance_t * instance, to avoid duplicates of candidates. */ ++end; for (; end < matrix.size(); ++end) { - const size_t size = matrix.get_column_size(end); + const size_t index = end - 1; + const size_t size = matrix.get_column_size(index); /* assume only one zero ChewingKey "'" here, but no check. */ if (1 != size) break; - matrix.get_item(end, 0, key, key_rest); + matrix.get_item(index, 0, key, key_rest); - if (zero_key != key) { - /* non-zero ChewingKey has at least length of one. */ - ++end; + if (zero_key != key) break; - } } } |