Fix an oob access in parsedefinitions_game(). DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4643 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-10-05 18:32:59 +00:00
parent 706aec5527
commit ff7d664d1e
2 changed files with 3 additions and 1 deletions

View file

@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __anim_h__
#define __anim_h__
#define NUM_HARDCODED_ANIMS 12
#define NUM_HARDCODED_ANIMS 11
# ifdef USE_LIBVPX
extern uint16_t anim_hi_numsounds[NUM_HARDCODED_ANIMS], *anim_hi_sounds[NUM_HARDCODED_ANIMS];

View file

@ -9498,6 +9498,8 @@ static int32_t parsedefinitions_game(scriptfile *script, int32_t preload)
// NUM_HARDCODED_ANIMS
};
EDUKE32_STATIC_ASSERT(ARRAY_SIZE(hardcoded_anim_tokens) == NUM_HARDCODED_ANIMS);
animnum = getatoken(script, hardcoded_anim_tokens, NUM_HARDCODED_ANIMS);
if ((unsigned)animnum >= NUM_HARDCODED_ANIMS)
initprintf("Error: expected a hardcoded anim file name (sans extension) on line %s:%d\n",