diff --git a/polymer/eduke32/source/anim.h b/polymer/eduke32/source/anim.h index 2267b82a2..a60246628 100644 --- a/polymer/eduke32/source/anim.h +++ b/polymer/eduke32/source/anim.h @@ -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]; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 3f968523c..e193a18c9 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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",