user32: Fix side effect in SubtractRect().
This commit is contained in:
parent
7a7925c872
commit
1f15169f72
@ -1421,14 +1421,14 @@ BOOL WINAPI SubtractRect( LPRECT dest, const RECT *src1, const RECT *src2 )
|
|||||||
SetRectEmpty( dest );
|
SetRectEmpty( dest );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*dest = *src1;
|
|
||||||
if (IntersectRect( &tmp, src1, src2 ))
|
if (IntersectRect( &tmp, src1, src2 ))
|
||||||
{
|
{
|
||||||
if (EqualRect( &tmp, dest ))
|
if (EqualRect( &tmp, src1 ))
|
||||||
{
|
{
|
||||||
SetRectEmpty( dest );
|
SetRectEmpty( dest );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
*dest = *src1;
|
||||||
if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))
|
if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))
|
||||||
{
|
{
|
||||||
if (tmp.left == dest->left) dest->left = tmp.right;
|
if (tmp.left == dest->left) dest->left = tmp.right;
|
||||||
@ -1440,6 +1440,10 @@ BOOL WINAPI SubtractRect( LPRECT dest, const RECT *src1, const RECT *src2 )
|
|||||||
else if (tmp.bottom == dest->bottom) dest->bottom = tmp.top;
|
else if (tmp.bottom == dest->bottom) dest->bottom = tmp.top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*dest = *src1;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user