Commit f09c498e authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

usp10: Use heap_calloc() in SHAPE_does_GSUB_feature_apply_to_chars().

parent 7a5a63de
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment