catch playeringame[] overflow (#497)

This commit is contained in:
Fabian Greffrath 2022-04-07 10:46:03 +02:00 committed by GitHub
parent ee2d4a4be0
commit c70f5a5309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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];