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

* commit '3b1561a18c466c23e9c5a3c3297bfc97e881c829':
  Fix for an IOOBoundsException in Paint.
This commit is contained in:
Gilles Debunne
2011-01-28 11:04:36 -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;
}