IsRectEmpty also returns true for negative width/heights (verified
against Windows), found by Brad Oliver <bradman@pobox.com>.
This commit is contained in:
parent
a18fc8a7c7
commit
8c45e243b0
|
@ -80,19 +80,23 @@ BOOL WINAPI CopyRect( RECT *dest, const RECT *src )
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IsRectEmpty16 (USER.75)
|
* IsRectEmpty16 (USER.75)
|
||||||
|
*
|
||||||
|
* Bug compat: Windows checks for 0 or negative width/height.
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI IsRectEmpty16( const RECT16 *rect )
|
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)
|
* IsRectEmpty32 (USER32.347)
|
||||||
|
*
|
||||||
|
* Bug compat: Windows checks for 0 or negative width/height.
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI IsRectEmpty( const RECT *rect )
|
BOOL WINAPI IsRectEmpty( const RECT *rect )
|
||||||
{
|
{
|
||||||
return ((rect->left == rect->right) || (rect->top == rect->bottom));
|
return ((rect->left >= rect->right) || (rect->top >= rect->bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue