mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 966021 - fix load_truetype_table in the cairo dwrite font backend. r=bas
This commit is contained in:
parent
1f07d87838
commit
8b89967b1d
@ -1052,10 +1052,12 @@ _cairo_dwrite_load_truetype_table(void *scaled_font,
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
}
|
||||
|
||||
*length = size;
|
||||
if (buffer) {
|
||||
memcpy(buffer, data, size);
|
||||
if (buffer && *length && (UINT32)offset < size) {
|
||||
size = MIN(size - (UINT32)offset, *length);
|
||||
memcpy(buffer, (const char*)data + offset, size);
|
||||
}
|
||||
*length = size;
|
||||
|
||||
if (tableContext) {
|
||||
face->dwriteface->ReleaseFontTable(tableContext);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user