From e38b41911f40fe4d407d5c0b7ab66066cb4892a5 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 27 Nov 2000 23:06:36 +0000 Subject: [PATCH] Truncate dest blit rectangle down to surface size. --- dlls/ddraw/dsurface/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c index fb66438175f..d5843e136e1 100644 --- a/dlls/ddraw/dsurface/main.c +++ b/dlls/ddraw/dsurface/main.c @@ -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;