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

Commit 3c159f6f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Validate index for cursor on BiDi text"

parents 485e8a34 58df795c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1601,10 +1601,11 @@ public abstract class Layout {
        }

        float get(final int offset) {
            if (mHorizontals == null || offset < 0 || offset >= mHorizontals.length) {
            final int index = offset - mLineStartOffset;
            if (mHorizontals == null || index < 0 || index >= mHorizontals.length) {
                return getHorizontal(offset, mPrimary);
            } else {
                return mHorizontals[offset - mLineStartOffset];
                return mHorizontals[index];
            }
        }
    }