diff --git a/reactos/subsystems/win32/win32k/dib/floodfill.c b/reactos/subsystems/win32/win32k/dib/floodfill.c index c31c262d9fc..a24ade73a3d 100644 --- a/reactos/subsystems/win32/win32k/dib/floodfill.c +++ b/reactos/subsystems/win32/win32k/dib/floodfill.c @@ -59,8 +59,7 @@ static __inline VOID addItemFlood(FLOODINFO *info, ULONG Color, BOOL isSurf) { - if (x >= DstRect->left && x <= DstRect->right && - y >= DstRect->top && y <= DstRect->bottom) + if (RECTL_bPointInRect(DstRect,x,y)) { if (isSurf == TRUE && DibFunctionsForBitmapFormat[DstSurf->iBitmapFormat].DIB_GetPixel(DstSurf, x, y) != Color) diff --git a/reactos/subsystems/win32/win32k/include/rect.h b/reactos/subsystems/win32/win32k/include/rect.h index e24bc4b0127..e5c73fa8a79 100644 --- a/reactos/subsystems/win32/win32k/include/rect.h +++ b/reactos/subsystems/win32/win32k/include/rect.h @@ -41,8 +41,8 @@ BOOL FORCEINLINE RECTL_bPointInRect(const RECTL *prcl, INT x, INT y) { - return (x >= prcl->left && x <= prcl->right && - y >= prcl->top && y <= prcl->bottom); + return (x >= prcl->left && x < prcl->right && + y >= prcl->top && y < prcl->bottom); } BOOL