Commit 053e5b59 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Fix RegisterCount calculation.

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