From 66e3a53991942517305760af51c36ff197479fb1 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Sat, 30 Nov 2019 15:14:24 +0000 Subject: [PATCH] Fix another potential index of sprite array by -1 --- source/exhumed/src/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exhumed/src/player.cpp b/source/exhumed/src/player.cpp index d29768ba3..287edb6b2 100644 --- a/source/exhumed/src/player.cpp +++ b/source/exhumed/src/player.cpp @@ -1173,8 +1173,8 @@ void FuncPlayer(int pA, int nDamage, int nRun) } else { - // ded - if (sprite[nSprite2].statnum == 100) + // player has died + if (nSprite2 > -1 && sprite[nSprite2].statnum == 100) { short nPlayer2 = GetPlayerFromSprite(nSprite2);