Skip to content
Snippets Groups Projects
Commit bb84359c authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard
Browse files

Avoid division by zero.

parent 6e9c506f
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
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