mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix crash when calling rotatesprite from CON with invalid coordinates
git-svn-id: https://svn.eduke32.com/eduke32@1600 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c369aec8cc
commit
c2ad42b303
1 changed files with 7 additions and 0 deletions
|
@ -2367,6 +2367,13 @@ nullquote:
|
|||
int32_t x2=Gv_GetVarX(*insptr++), y2=Gv_GetVarX(*insptr++);
|
||||
|
||||
if (tw == CON_ROTATESPRITE && !(orientation & 256)) {x<<=16; y<<=16;}
|
||||
|
||||
if (x < (-160)<<16 || x >= (480<<16) || y < (-100)<<16 || y >= (300<<16))
|
||||
{
|
||||
OSD_Printf(CON_ERROR "invalid coordinates: %d, %d\n",g_errorLineNum, keyw[g_tw], x, y);
|
||||
continue;
|
||||
}
|
||||
|
||||
rotatesprite(x,y,z,a,tilenum,shade,pal,2|orientation,x1,y1,x2,y2);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue