Skip to content
Snippets Groups Projects
Commit e38b4191 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard
Browse files

Truncate dest blit rectangle down to surface size.

parent c7dd2542
No related branches found
No related tags found
No related merge requests found
......@@ -232,7 +232,12 @@ HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
}
}
if (src) assert((xsrc.bottom-xsrc.top) <= sdesc.dwHeight);
assert((xdst.bottom-xdst.top) <= ddesc.dwHeight);
/* truncate dst rect to dest surface. */
if ((xdst.bottom-xdst.top) > ddesc.dwHeight)
xdst.bottom = xdst.top+ddesc.dwHeight;
if ((xdst.right-xdst.left) > ddesc.dwWidth)
xdst.right = xdst.left+ddesc.dwWidth;
bpp = GET_BPP(ddesc);
srcheight = xsrc.bottom - xsrc.top;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment