am e1df07fc: Merge "Fix for an IOOBoundsException in Paint." into honeycomb

* commit 'e1df07fc5a88da0242a6ade054423ec464c5318f':
  Fix for an IOOBoundsException in Paint.
This commit is contained in:
Gilles Debunne
2011-01-28 11:02:21 -08:00
committed by Android Git Automerger

View File

@@ -1690,7 +1690,7 @@ public class Paint {
int contextLen = contextEnd - contextStart;
char[] buf = TemporaryBuffer.obtain(contextLen);
TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
int result = getTextRunCursor(buf, 0, contextLen, flags, offset, cursorOpt);
int result = getTextRunCursor(buf, 0, contextLen, flags, offset - contextStart, cursorOpt);
TemporaryBuffer.recycle(buf);
return result;
}