Commit f46e1d8a authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Fix return value for OffsetRgn if x and y are 0.

parent a3d3ff8d
......@@ -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 );
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;
}
......
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