summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/Paint.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index cde997e..048d09c 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -1349,7 +1349,7 @@ public class Paint {
if (text == null) {
throw new IllegalArgumentException("text cannot be null");
}
- if ((index | count) < 0 || index + count > text.length) {
+ if (index < 0 || text.length - index < Math.abs(count)) {
throw new ArrayIndexOutOfBoundsException();
}