diff options
| -rw-r--r-- | core/jni/android/graphics/Paint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index 27d8fed51e8a..1844a9870ada 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -823,7 +823,7 @@ namespace PaintGlue { static jfloat doRunAdvance(const Paint* paint, Typeface* typeface, const jchar buf[], jint start, jint count, jint bufSize, jboolean isRtl, jint offset) { int bidiFlags = isRtl ? kBidi_Force_RTL : kBidi_Force_LTR; - if (offset == count) { + if (offset == start + count) { return MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize, nullptr); } |