Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c53661f1 authored by Jean Chalard's avatar Jean Chalard
Browse files

Fix a possible OutOfBoundsException

Change-Id: I6eb13c228738119c78496a96acaedbccefd83cd3
parent 3458d618
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -156,6 +156,11 @@ public class AndroidSpellCheckerService extends SpellCheckerService {
                // }
                return true;
            }
            if (insertIndex >= mMaxLength) {
                // We found a suggestion, but its score is too weak to be kept considering
                // the suggestion limit.
                return true;
            }

            // Compute the normalized score and skip this word if it's normalized score does not
            // make the threshold.