IsRectEmpty also returns true for negative width/heights (verified

against Windows), found by Brad Oliver <bradman@pobox.com>.
This commit is contained in:
Marcus Meissner 2000-03-09 18:35:37 +00:00 committed by Alexandre Julliard
parent a18fc8a7c7
commit 8c45e243b0
1 changed files with 6 additions and 2 deletions

View File

@ -80,19 +80,23 @@ BOOL WINAPI CopyRect( RECT *dest, const RECT *src )
/***********************************************************************
* IsRectEmpty16 (USER.75)
*
* Bug compat: Windows checks for 0 or negative width/height.
*/
BOOL16 WINAPI IsRectEmpty16( const RECT16 *rect )
{
return ((rect->left == rect->right) || (rect->top == rect->bottom));
return ((rect->left >= rect->right) || (rect->top >= rect->bottom));
}
/***********************************************************************
* IsRectEmpty32 (USER32.347)
*
* Bug compat: Windows checks for 0 or negative width/height.
*/
BOOL WINAPI IsRectEmpty( const RECT *rect )
{
return ((rect->left == rect->right) || (rect->top == rect->bottom));
return ((rect->left >= rect->right) || (rect->top >= rect->bottom));
}