Fix StringIndexOutOfBoundsException
bug: 3325065 Change-Id: Ic3d2dca5b2aa1681d472c7f96b31737e15f4952d
This commit is contained in:
parent
7a42a46069
commit
255c044b0e
1 changed files with 2 additions and 1 deletions
|
@ -158,6 +158,7 @@ public class ExpandableDictionary extends Dictionary {
|
||||||
private void addWordRec(NodeArray children, final String word, final int depth,
|
private void addWordRec(NodeArray children, final String word, final int depth,
|
||||||
final int frequency, Node parentNode) {
|
final int frequency, Node parentNode) {
|
||||||
final int wordLength = word.length();
|
final int wordLength = word.length();
|
||||||
|
if (wordLength <= depth) return;
|
||||||
final char c = word.charAt(depth);
|
final char c = word.charAt(depth);
|
||||||
// Does children have the current character?
|
// Does children have the current character?
|
||||||
final int childrenLength = children.mLength;
|
final int childrenLength = children.mLength;
|
||||||
|
|
Loading…
Reference in a new issue