From 2bc248b698b17fd333beae828039a8bff7604a9f Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Tue, 14 Dec 2010 10:35:19 -0800 Subject: Off by one index error in word selection Change-Id: Ia6b14b22cc5cf65a235bcdf7cbec48bd76f74460 --- core/java/android/widget/TextView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 751cd53..d21870c 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7646,7 +7646,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (start == end) { // Cases where the text ends with a '.' and we select from the end of the line // (right after the dot), or when we select from the space character in "aaa, bbb". - final char c = mTransformed.charAt(start); + final char c = mTransformed.charAt(start - 1); final int type = Character.getType(c); if (type == Character.OTHER_PUNCTUATION) continue; } -- cgit v1.1