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

Commit 1c63b341 authored by Mark Wagner's avatar Mark Wagner Committed by Android (Google) Code Review
Browse files

Merge "check offset and don't crash"

parents e60f6730 60919953
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -1564,6 +1564,10 @@ public class TextUtils {
     * {@link #CAP_MODE_SENTENCES}.
     * {@link #CAP_MODE_SENTENCES}.
     */
     */
    public static int getCapsMode(CharSequence cs, int off, int reqModes) {
    public static int getCapsMode(CharSequence cs, int off, int reqModes) {
        if (off < 0) {
            return 0;
        }

        int i;
        int i;
        char c;
        char c;
        int mode = 0;
        int mode = 0;