Commit 8c45e243 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

IsRectEmpty also returns true for negative width/heights (verified

against Windows), found by Brad Oliver <bradman@pobox.com>.
parent a18fc8a7
...@@ -80,19 +80,23 @@ BOOL WINAPI CopyRect( RECT *dest, const RECT *src ) ...@@ -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));
} }
......
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