commit | 5783c138065b7949f754c78d3e3ea0e5da7ca5a6 | [log] [tgz] |
---|---|---|
author | Seigo Nonaka <nona@google.com> | Mon Oct 15 17:35:56 2018 -0700 |
committer | Seigo Nonaka <nona@google.com> | Mon Oct 15 18:03:44 2018 -0700 |
tree | cb855bfc4f8c502f864c8ab8213bc1a7e3ec844c | |
parent | 29077124e9bce23e4ffc1d4d3d0f8bac07016cc4 [diff] |
Fix invalid character access The invalid access has introduced by I976df4db63be241af395dd30dd94182f76bdae53 Bug: 114454225 Test: atest StaticLayoutLineBreakingTest Change-Id: I8ad3d7761c98eb8ace97af3a4794d4bfe04c05e0
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java index ac7e574..2cf0262 100644 --- a/core/java/android/text/StaticLayout.java +++ b/core/java/android/text/StaticLayout.java
@@ -777,7 +777,7 @@ width += lineWidths[i]; } else { for (int j = (i == 0 ? 0 : breaks[i - 1]); j < breaks[i]; j++) { - width += measuredPara.getCharWidthAt(j - paraStart); + width += measuredPara.getCharWidthAt(j); } } hasTab |= hasTabs[i];