Commit 04f8ecd9 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Check that ExtFloodFill()'s initial co-ordinates lie within the dib.

It might seem more natural to move this check inside is_interior(), but this would slow down the unclipped case. Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cece771b
......@@ -1055,6 +1055,9 @@ BOOL dibdrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT type )
TRACE( "(%p, %d, %d, %08x, %d)\n", pdev, x, y, color, type );
if (x < 0 || x >= pdev->dib.rect.right - pdev->dib.rect.left ||
y < 0 || y >= pdev->dib.rect.bottom - pdev->dib.rect.top) return FALSE;
if (!is_interior( &pdev->dib, pdev->clip, x, y, pixel, type )) return FALSE;
if (!(rgn = CreateRectRgn( 0, 0, 0, 0 ))) return FALSE;
......
......@@ -2792,6 +2792,9 @@ static void draw_graphics(HDC hdc, const BITMAPINFO *bmi, BYTE *bits)
ExtSelectClipRgn( hdc, NULL, RGN_COPY );
ret = ExtFloodFill( hdc, -1, -1, RGB( 0, 0xff, 0 ), FLOODFILLSURFACE );
ok (!ret, "got ret %d\n", ret);
SelectObject(hdc, orig_brush);
SelectObject(hdc, orig_pen);
DeleteObject(solid_brush);
......
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