mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:13:56 +00:00
Avoid division by zero.
This commit is contained in:
parent
6e9c506f4e
commit
bb84359c41
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue