Bounds-check the tile number gotten from EVENT_GETMENUTILE.

git-svn-id: https://svn.eduke32.com/eduke32@4034 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-08-23 17:01:14 +00:00
parent 8d84706dc9
commit e0e3973b47

View file

@ -3952,6 +3952,7 @@ void G_DrawBackground(void)
if (!fstilep)
#endif
{
if ((unsigned)bgtile < MAXTILES)
for (y=y1; y<y2; y+=tilesizy[bgtile])
for (x=0; x<xdim; x+=tilesizx[bgtile])
rotatesprite_fs(x<<16,y<<16,65536L,0,bgtile,16,0,8+16+64);