diff options
author | 2012-02-03 10:51:34 +0900 | |
---|---|---|
committer | 2012-02-03 11:15:46 +0900 | |
commit | 9242a2bcf8a6b07bb045a8356711bed1493c251e (patch) | |
tree | 9c7cebb930034ce21b7402f2fda3df8ddb7bd797 /tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java | |
parent | fbd83a87123494a9a02364fa6688734155728256 (diff) | |
download | latinime-9242a2bcf8a6b07bb045a8356711bed1493c251e.tar.gz latinime-9242a2bcf8a6b07bb045a8356711bed1493c251e.tar.xz latinime-9242a2bcf8a6b07bb045a8356711bed1493c251e.zip |
Fix string iterations in a couple places.
Seems I didn't get how to iterate on a String correctly >.>
Talk about a big bug. Anyway, I think it's working now.
Bug: 5955228
Change-Id: I988c900cf2a16c44b9505cfd4f77c7cda7e592f0
Diffstat (limited to 'tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java')
-rw-r--r-- | tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java b/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java index 918b1ca4b..08143d3ea 100644 --- a/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java +++ b/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java @@ -164,7 +164,7 @@ public class FusionDictionary implements Iterable<Word> { static private int[] getCodePoints(String word) { final int wordLength = word.length(); int[] array = new int[word.codePointCount(0, wordLength)]; - for (int i = 0; i < wordLength; ++i) { + for (int i = 0; i < wordLength; i = word.offsetByCodePoints(i, 1)) { array[i] = word.codePointAt(i); } return array; |