Commit 9d63e3f9 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

server: Avoid reallocating region data when there is still enough space.

parent 516ed8e7
......@@ -108,7 +108,7 @@ static const rectangle_t empty_rect; /* all-zero rectangle for empty regions */
/* add a rectangle to a region */
static inline rectangle_t *add_rect( struct region *reg )
{
if (reg->num_rects >= reg->size - 1)
if (reg->num_rects >= reg->size)
{
rectangle_t *new_rect = realloc( reg->rects, 2 * sizeof(rectangle_t) * reg->size );
if (!new_rect)
......
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