Commit db5053c9 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wined3d: Avoid sizeof on structs with variable length arrays.

parent 435ac27d
...@@ -96,7 +96,7 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags) ...@@ -96,7 +96,7 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags)
struct wined3d *object; struct wined3d *object;
HRESULT hr; HRESULT hr;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(struct wined3d, adapters[1]));
if (!object) if (!object)
{ {
ERR("Failed to allocate wined3d object memory.\n"); ERR("Failed to allocate wined3d object memory.\n");
......
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