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

Commit 62dbd82a authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Fix for IndexOutOfBounds in TextView getWordLimitsAt.

Bug http://b/issue?id=2948904

Change-Id: I10008374da92d5a98ec567cc76732383e66c4c5b
parent c6d7a895
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7047,14 +7047,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            return -1;
        }

        int end = offset;
        int len = mText.length();
        int end = Math.min(offset, len);

        if (end < 0) {
            return -1;
        }

        int start = end;
        int len = mText.length();

        for (; start > 0; start--) {
            char c = mTransformed.charAt(start - 1);