Merge "Fix for 7281523 android.text.cts.SelectionTest#testMoveRight failures" into jb-mr1-dev
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 1f70c66..150caf3 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -629,7 +629,7 @@
jint count, jint flags, jint offset, jint opt) {
jfloat scalarArray[count];
- TextLayout::getTextRunAdvances(paint, text, start, count, count, flags,
+ TextLayout::getTextRunAdvances(paint, text, start, count, start + count, flags,
scalarArray, NULL /* dont need totalAdvance */);
jint pos = offset - start;