wined3d: Avoid sizeof on structs with variable length arrays.

Henri Verbeet hverbeet at gmail.com
Wed Jun 13 05:56:10 CDT 2012


On 13 June 2012 10:41, Michael Stefaniuc <mstefani at redhat.de> wrote:
> -    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
> +    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(struct wined3d, adapters[1]));

That's not really a VLA, just a somewhat stupid array of size 1.



More information about the wine-devel mailing list