mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
Fix return value for OffsetRgn if x and y are 0.
This commit is contained in:
parent
a3d3ff8d34
commit
f46e1d8a51
@ -505,14 +505,17 @@ INT16 WINAPI OffsetRgn16( HRGN16 hrgn, INT16 x, INT16 y )
|
||||
INT WINAPI OffsetRgn( HRGN hrgn, INT x, INT y )
|
||||
{
|
||||
RGNOBJ * obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
|
||||
INT ret;
|
||||
|
||||
if (obj && (x || y))
|
||||
{
|
||||
INT ret;
|
||||
TRACE("%04x %d,%d\n", hrgn, x, y);
|
||||
|
||||
if (!obj)
|
||||
return ERROR;
|
||||
|
||||
if(x || y) {
|
||||
int nbox = obj->rgn->numRects;
|
||||
RECT *pbox = obj->rgn->rects;
|
||||
|
||||
TRACE(" %04x %d,%d\n", hrgn, x, y );
|
||||
if(nbox) {
|
||||
while(nbox--) {
|
||||
pbox->left += x;
|
||||
@ -526,11 +529,10 @@ INT WINAPI OffsetRgn( HRGN hrgn, INT x, INT y )
|
||||
obj->rgn->extents.top += y;
|
||||
obj->rgn->extents.bottom += y;
|
||||
}
|
||||
ret = obj->rgn->type;
|
||||
GDI_HEAP_UNLOCK( hrgn );
|
||||
return ret;
|
||||
}
|
||||
return ERROR;
|
||||
ret = obj->rgn->type;
|
||||
GDI_HEAP_UNLOCK( hrgn );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user