From c70f5a5309c1dd0f2baeb2720c8a4a962993d78f Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 7 Apr 2022 10:46:03 +0200 Subject: [PATCH] catch playeringame[] overflow (#497) --- Source/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/p_mobj.c b/Source/p_mobj.c index b43ae09b..f5556649 100644 --- a/Source/p_mobj.c +++ b/Source/p_mobj.c @@ -1031,7 +1031,7 @@ void P_SpawnPlayer (mapthing_t* mthing) // not playing? - if (!playeringame[mthing->type-1]) + if (mthing->type == 0 || !playeringame[mthing->type-1]) // [FG] catch overflow return; p = &players[mthing->type-1];