d3dx9: Fix RegisterCount calculation.

This commit is contained in:
Rico Schüller 2012-08-25 16:28:34 +02:00 committed by Alexandre Julliard
parent 4d59b503de
commit 053e5b59ec
1 changed files with 1 additions and 4 deletions

View File

@ -1616,8 +1616,6 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
if (count)
{
WORD size_element = 0;
constant->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*constant->constants) * count);
if (!constant->constants)
{
@ -1634,8 +1632,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
if (hr != D3D_OK)
goto error;
if (i == 0) size_element = constant->constants[i].desc.RegisterCount;
size += size_element;
size += constant->constants[i].desc.RegisterCount;
}
}
else