Merge "Fix: doRunAdvance returns wrong value when offset == count." into nyc-dev

This commit is contained in:
Keisuke Kuroyanagi
2016-04-01 05:27:35 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}