Fix: doRunAdvance returns wrong value when offset == count.

Bug: 27869952
Change-Id: I56278676da4c354ced4244e4b073bb0d82edf93b
This commit is contained in:
Keisuke Kuroyanagi
2016-03-28 19:16:30 +09:00
parent f0bb87b7c4
commit b3677715e6

View File

@@ -823,7 +823,7 @@ namespace PaintGlue {
static jfloat doRunAdvance(const Paint* paint, TypefaceImpl* 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);
}