Skip to content

Commit e7197a9

Browse files
Fabrice Di MeglioAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug #5233207 android.graphics.cts.PaintTest#testBreakText fails on IRK56F trygon-userdebug"
2 parents 49fb943 + 8fa6503 commit e7197a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphics/java/android/graphics/Paint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ public int breakText(char[] text, int index, int count,
13491349
if (text == null) {
13501350
throw new IllegalArgumentException("text cannot be null");
13511351
}
1352-
if ((index | count) < 0 || index + count > text.length) {
1352+
if (index < 0 || text.length - index < Math.abs(count)) {
13531353
throw new ArrayIndexOutOfBoundsException();
13541354
}
13551355

0 commit comments

Comments
 (0)