diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index 1f70c669df63e..150caf3c5a957 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -629,7 +629,7 @@ public: 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;