commit | 11a431fca6777a531b5d9da51f4105d1cbbd1f77 | [log] [tgz] |
---|---|---|
author | Keisuke Kuroynagi <ksk@google.com> | Wed Jul 31 16:58:09 2013 +0900 |
committer | Keisuke Kuroynagi <ksk@google.com> | Wed Jul 31 16:58:09 2013 +0900 |
tree | 4a922af0031d509f7b722a934e192392da52654a | |
parent | f8c1aefd90fced4edec4eaa8d4a9ded0edc5ccf3 [diff] |
Fix: appendTwoWords cannot handle MAX_WORD_LENGTH-chars word. Bug: 9892258 Change-Id: Ib4ef7850c8fc8b1d99d594bb7ef68ce645f0f1f3
diff --git a/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp b/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp index f3b110b..6b4ef2f 100644 --- a/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp +++ b/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp
@@ -150,7 +150,7 @@ } actualLength1 = i + 1; } - actualLength1 = min(actualLength1, MAX_WORD_LENGTH - actualLength0 - 1); + actualLength1 = min(actualLength1, MAX_WORD_LENGTH - actualLength0); memcpy(&dest[actualLength0], src1, actualLength1 * sizeof(dest[0])); return actualLength0 + actualLength1; }