Fix out-of-bounds access in tile selector code in astub.c

git-svn-id: https://svn.eduke32.com/eduke32@2177 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-12 23:18:15 +00:00
parent 2f14c6dbed
commit 4989c173bd

View file

@ -3333,7 +3333,7 @@ static int32_t m32gettile(int32_t idInitialTile)
{
temp = i;
while (localartfreq[temp]<localartfreq[temp+gap] && temp >= 0)
while (temp >= 0 && localartfreq[temp]<localartfreq[temp+gap])
{
int32_t tempint;