Avoid division by zero.

This commit is contained in:
Andreas Mohr 2000-11-04 02:55:08 +00:00 committed by Alexandre Julliard
parent 6e9c506f4e
commit bb84359c41

View file

@ -281,6 +281,8 @@ HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
LPBYTE sbase;
int sx, xinc, sy, yinc;
if (!dstwidth || !dstheight) /* hmm... stupid program ? */
goto release;
sbase = (BYTE*)sdesc.u1.lpSurface+(xsrc.top*sdesc.lPitch)+xsrc.left*bpp;
xinc = (srcwidth << 16) / dstwidth;
yinc = (srcheight << 16) / dstheight;