summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-07-20 12:43:32 +0800
committerPeng Wu <alexepico@gmail.com>2016-07-20 12:43:32 +0800
commit646bb31f32fbef6fec5eb25fe9a9e86fc03c1276 (patch)
tree3fa6566bd5107445f131a32fe411c88fdcf2d58d
parentc31c421466a183ac4e207d8cf57850648b954d45 (diff)
downloadlibpinyin-646bb31f32fbef6fec5eb25fe9a9e86fc03c1276.tar.gz
libpinyin-646bb31f32fbef6fec5eb25fe9a9e86fc03c1276.tar.xz
libpinyin-646bb31f32fbef6fec5eb25fe9a9e86fc03c1276.zip
fixes _get_char_offset_recur function
-rw-r--r--src/pinyin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 01dcb41..268e49c 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -2481,6 +2481,9 @@ static bool _get_char_offset_recur(pinyin_instance_t * instance,
const size_t newstart = key_rest.m_raw_end;
+ if (newstart > offset)
+ return true;
+
const ChewingKey zero_key;
if (zero_key == key) {
/* assume only one key here for "'" or the last key. */