mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-23 07:30:40 +00:00
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:
parent
706aec5527
commit
ff7d664d1e
2 changed files with 3 additions and 1 deletions
|
@ -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];
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue