Fix an out-of-bounds read in getpskyidx().

git-svn-id: https://svn.eduke32.com/eduke32@5263 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-06-06 15:04:17 +00:00
parent f52923fb4d
commit a1c4df267c

View file

@ -740,7 +740,7 @@ FORCE_INLINE int32_t getpskyidx(int32_t picnum)
{
int32_t j;
for (j=pskynummultis; j>0; j--) // NOTE: j==0 on non-early loop end
for (j=pskynummultis-1; j>0; j--) // NOTE: j==0 on non-early loop end
if (picnum == multipskytile[j])
break; // Have a match.