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,9 +3952,10 @@ void G_DrawBackground(void)
if (!fstilep)
#endif
{
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);
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);
}
else rotatesprite_fs(320<<15,200<<15,65536L,0,bgtile,16,0,2+8+64+(ud.bgstretch?1024:0));
return;