diff options
author | 2011-09-27 02:33:27 -0700 | |
---|---|---|
committer | 2011-09-27 02:33:27 -0700 | |
commit | 78e0af9dddee79fb477617fc0ac81e7ab50b71f5 (patch) | |
tree | 0516878e229c29b058ace1e666d46bbdc2ff9c90 | |
parent | d3fd8d2a6d37ffd2037a83e8df679e7fc41d4828 (diff) | |
parent | 091ee76285593d4c2a638d1927016e5bdfceccfd (diff) | |
download | latinime-78e0af9dddee79fb477617fc0ac81e7ab50b71f5.tar.gz latinime-78e0af9dddee79fb477617fc0ac81e7ab50b71f5.tar.xz latinime-78e0af9dddee79fb477617fc0ac81e7ab50b71f5.zip |
am 091ee762: Merge "Fix a bug ending in a NPE in some rare cases."
* commit '091ee76285593d4c2a638d1927016e5bdfceccfd':
Fix a bug ending in a NPE in some rare cases.
-rw-r--r-- | tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java b/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java index 031f35dfe..f6220eea2 100644 --- a/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java +++ b/tools/makedict/src/com/android/inputmethod/latin/FusionDictionary.java @@ -217,7 +217,7 @@ public class FusionDictionary implements Iterable<Word> { int nodeIndex = findIndexOfChar(mRoot, word[charIndex]); while (CHARACTER_NOT_FOUND != nodeIndex) { currentGroup = currentNode.mData.get(nodeIndex); - differentCharIndex = compareArrays(currentGroup.mChars, word, charIndex) ; + differentCharIndex = compareArrays(currentGroup.mChars, word, charIndex); if (ARRAYS_ARE_EQUAL != differentCharIndex && differentCharIndex < currentGroup.mChars.length) break; if (null == currentGroup.mChildren) break; @@ -268,7 +268,7 @@ public class FusionDictionary implements Iterable<Word> { + new String(word, 0, word.length)); } final CharGroup newGroup = new CharGroup(word, - currentGroup.mBigrams, frequency); + currentGroup.mBigrams, frequency, currentGroup.mChildren); currentNode.mData.set(nodeIndex, newGroup); } } else { |