Avoid division by zero.
This commit is contained in:
parent
6e9c506f4e
commit
bb84359c41
|
@ -281,6 +281,8 @@ HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
|
||||||
LPBYTE sbase;
|
LPBYTE sbase;
|
||||||
int sx, xinc, sy, yinc;
|
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;
|
sbase = (BYTE*)sdesc.u1.lpSurface+(xsrc.top*sdesc.lPitch)+xsrc.left*bpp;
|
||||||
xinc = (srcwidth << 16) / dstwidth;
|
xinc = (srcwidth << 16) / dstwidth;
|
||||||
yinc = (srcheight << 16) / dstheight;
|
yinc = (srcheight << 16) / dstheight;
|
||||||
|
|
Loading…
Reference in New Issue