wined3d: Avoid sizeof on structs with variable length arrays.
This commit is contained in:
parent
435ac27d8f
commit
db5053c950
|
@ -96,7 +96,7 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags)
|
|||
struct wined3d *object;
|
||||
HRESULT hr;
|
||||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(struct wined3d, adapters[1]));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Failed to allocate wined3d object memory.\n");
|
||||
|
|
Loading…
Reference in New Issue