Fix compiler errors

The truncation handling in this one spot is okay, but the compiler isn't smart
enough for it. I'm leaving it as a warning because I'd like to make a dedicated
function for handling snprintf truncation in the future.
This commit is contained in:
James R 2019-05-28 15:11:37 -07:00
parent 71e3ec55bf
commit 6d4cdfaab7
2 changed files with 4 additions and 3 deletions

View File

@ -222,6 +222,7 @@ endif
ifdef GCC71
WFLAGS+=-Wno-error=implicit-fallthrough
WFLAGS+=-Wno-implicit-fallthrough
WFLAGS+=-Wno-error=format-truncation
endif
ifdef GCC80
WFLAGS+=-Wno-error=format-overflow

View File

@ -8386,13 +8386,13 @@ void A_SPBChase(mobj_t *actor)
if (actor->tracer && actor->tracer->health)
{
// we're tailing a player, now's a good time to regain our damage properties
actor->flags &= ~MF_NOCLIPTHING;
fixed_t defspeed = wspeed;
fixed_t range = (160*actor->tracer->scale);
fixed_t cx = 0, cy =0;
// we're tailing a player, now's a good time to regain our damage properties
actor->flags &= ~MF_NOCLIPTHING;
// Play the intimidating gurgle
if (!S_SoundPlaying(actor, actor->info->activesound))
S_StartSound(actor, actor->info->activesound);