mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix for Minikin native crash
The context start offset wasn't being taken into account for accumulating the advance values, leading in some cases to array index overflow. This is a fix for bug 15327918 "SIGSEGV in android::MinikinFontSkia::GetSkTypeface()" Change-Id: I9b646785724c9b72d862b822cd84661c106fbe52
This commit is contained in:
parent
7c38238119
commit
0297ee985c
@ -661,7 +661,7 @@ void Layout::doLayoutRun(const uint16_t* buf, size_t start, size_t count, size_t
|
||||
ctx->paint.font->GetBounds(&glyphBounds, glyph_ix, ctx->paint);
|
||||
glyphBounds.offset(x + xoff, y + yoff);
|
||||
mBounds.join(glyphBounds);
|
||||
size_t cluster = info[i].cluster;
|
||||
size_t cluster = info[i].cluster - start;
|
||||
mAdvances[cluster] += xAdvance;
|
||||
x += xAdvance;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user