Skip to content
Snippets Groups Projects
Commit 255c044b authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Fix StringIndexOutOfBoundsException

bug: 3325065
Change-Id: Ic3d2dca5b2aa1681d472c7f96b31737e15f4952d
parent 7a42a460
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,7 @@ public class ExpandableDictionary extends Dictionary {
public Context getContext() {
return mContext;
}
public int getMaxWordLength() {
return MAX_WORD_LENGTH;
}
......@@ -158,6 +158,7 @@ public class ExpandableDictionary extends Dictionary {
private void addWordRec(NodeArray children, final String word, final int depth,
final int frequency, Node parentNode) {
final int wordLength = word.length();
if (wordLength <= depth) return;
final char c = word.charAt(depth);
// Does children have the current character?
final int childrenLength = children.mLength;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment