Commit af759e30 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

wined3d: Ensure that wined3d_cs_st_require_space allocates the required space.

parent fabffe2b
...@@ -374,10 +374,11 @@ static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size) ...@@ -374,10 +374,11 @@ static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
{ {
void *new_data; void *new_data;
if (!(new_data = HeapReAlloc(GetProcessHeap(), 0, cs->data, cs->data_size * 2))) size = max( size, cs->data_size * 2 );
if (!(new_data = HeapReAlloc(GetProcessHeap(), 0, cs->data, size)))
return NULL; return NULL;
cs->data_size *= 2; cs->data_size = size;
cs->data = new_data; cs->data = new_data;
} }
......
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