Commit 55a4be12 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Fix initialization of D3DXPC_OBJECTs.

parent b6fc57ec
......@@ -4637,15 +4637,31 @@ static HRESULT d3dx9_parse_init_value(struct d3dx_parameter *param, const char *
if (size)
{
value = HeapAlloc(GetProcessHeap(), 0, size);
value = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
if (!value)
{
ERR("Failed to allocate data memory.\n");
return E_OUTOFMEMORY;
}
TRACE("Data: %s.\n", debugstr_an(ptr, size));
memcpy(value, ptr, size);
switch(param->class)
{
case D3DXPC_OBJECT:
break;
case D3DXPC_SCALAR:
case D3DXPC_VECTOR:
case D3DXPC_MATRIX_ROWS:
case D3DXPC_MATRIX_COLUMNS:
case D3DXPC_STRUCT:
TRACE("Data: %s.\n", debugstr_an(ptr, size));
memcpy(value, ptr, size);
break;
default:
FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
break;
}
}
hr = d3dx9_parse_value(param, value, data, &ptr, objects);
......
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