From 7cabbb43f66c4a784c3fd4abf9ca408fc38f30e6 Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Sat, 11 Jul 2020 23:35:16 +0200 Subject: [PATCH] monster: add BUGFIX to MAI_Golum The dMonster array stores monster array index numbers + 1 (or the corresponding negative version -(index + 1)). Prior to use, these must be decremented by 1. --- Source/monster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index 0116b1856..4c9cb29cf 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3952,7 +3952,7 @@ void MAI_Golum(int i) for (k = 0; k < 5; k++) { _menemy = dMonster[monster[i]._mx + k - 2][monster[i]._my + j - 2]; if (_menemy > 0) - monster[_menemy]._msquelch = UCHAR_MAX; + monster[_menemy]._msquelch = UCHAR_MAX; // BUGFIX: should be `monster[_menemy-1]`, not monster[_menemy]. } } }