usp10: Use heap_calloc() in ScriptShapeOpenType().
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
813ab925ab
commit
8d08ff3745
|
@ -3188,8 +3188,9 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
|
|||
WCHAR *rChars;
|
||||
if ((hr = SHAPE_CheckFontForRequiredFeatures(hdc, (ScriptCache *)*psc, psa)) != S_OK) return hr;
|
||||
|
||||
rChars = heap_alloc(sizeof(WCHAR) * cChars);
|
||||
if (!rChars) return E_OUTOFMEMORY;
|
||||
if (!(rChars = heap_calloc(cChars, sizeof(*rChars))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
for (i = 0, g = 0, cluster = 0; i < cChars; i++)
|
||||
{
|
||||
int idx = i;
|
||||
|
|
Loading…
Reference in New Issue