wined3d: Avoid sizeof on structs with variable length arrays.

This commit is contained in:
Michael Stefaniuc 2012-06-13 10:41:30 +02:00 committed by Alexandre Julliard
parent 435ac27d8f
commit db5053c950
1 changed files with 1 additions and 1 deletions

View File

@ -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");