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

Commit 8b305b51 authored by Siyamed Sinir's avatar Siyamed Sinir Committed by Android (Google) Code Review
Browse files

Merge "Fix PackedIntVector IndexOutOfBoundsException"

parents 3be11964 c6310439
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6454,7 +6454,7 @@ public class Editor {
    @VisibleForTesting
    public int getCurrentLineAdjustedForSlop(Layout layout, int prevLine, float y) {
        final int trueLine = mTextView.getLineAtCoordinate(y);
        if (layout == null || prevLine > layout.getLineCount()
        if (layout == null || prevLine >= layout.getLineCount()
                || layout.getLineCount() <= 0 || prevLine < 0) {
            // Invalid parameters, just return whatever line is at y.
            return trueLine;