Commit 00591095 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Fix initial allocation (Valgrind).

parent 03c29bf7
......@@ -206,13 +206,13 @@ static void *wpp_open_mem(const char *filename, int type)
{
if(includes_capacity == 0)
{
includes = HeapAlloc(GetProcessHeap(), 0, INCLUDES_INITIAL_CAPACITY);
includes = HeapAlloc(GetProcessHeap(), 0, INCLUDES_INITIAL_CAPACITY * sizeof(*includes));
if(includes == NULL)
{
ERR("Error allocating memory for the loaded includes structure\n");
goto error;
}
includes_capacity = INCLUDES_INITIAL_CAPACITY;
includes_capacity = INCLUDES_INITIAL_CAPACITY * sizeof(*includes);
}
else
{
......
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