Merge branch '11-array-bounds' into 'master'

Fix GCC 11 array-bounds warning in P_SetupStateAnimation

See merge request STJr/SRB2!1614
This commit is contained in:
sphere 2021-11-26 13:55:40 +00:00
commit e0071c1c36

View file

@ -78,7 +78,7 @@ void P_AddCachedAction(mobj_t *mobj, INT32 statenum)
//
// P_SetupStateAnimation
//
FUNCINLINE static ATTRINLINE void P_SetupStateAnimation(mobj_t *mobj, state_t *st)
static void P_SetupStateAnimation(mobj_t *mobj, state_t *st)
{
INT32 animlength = (mobj->sprite == SPR_PLAY && mobj->skin)
? (INT32)(((skin_t *)mobj->skin)->sprites[mobj->sprite2].numframes) - 1