usp10: Use heap_calloc() in SHAPE_does_GSUB_feature_apply_to_chars().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7a5a63de99
commit
f09c498e46
|
@ -712,13 +712,14 @@ static VOID load_ot_tables(HDC hdc, ScriptCache *psc)
|
|||
psc->GDEF_Table = load_gdef_table(hdc);
|
||||
}
|
||||
|
||||
INT SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, const WCHAR *chars, INT write_dir, INT count, const char* feature)
|
||||
int SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc,
|
||||
const WCHAR *chars, int write_dir, int count, const char *feature)
|
||||
{
|
||||
WORD *glyphs;
|
||||
INT glyph_count = count;
|
||||
INT rc;
|
||||
|
||||
glyphs = heap_alloc(2 * count * sizeof(*glyphs));
|
||||
glyphs = heap_calloc(count, 2 * sizeof(*glyphs));
|
||||
GetGlyphIndicesW(hdc, chars, count, glyphs, 0);
|
||||
rc = apply_GSUB_feature_to_glyph(hdc, psa, psc, glyphs, 0, write_dir, &glyph_count, feature);
|
||||
if (rc > GSUB_E_NOGLYPH)
|
||||
|
|
Loading…
Reference in New Issue