From b7a92d549c2f3c3f320d2ac8244e3584b56e150e Mon Sep 17 00:00:00 2001 From: vlad <1601159+vladtepesch@users.noreply.github.com> Date: Mon, 9 Aug 2021 23:48:56 +0200 Subject: [PATCH] fixes stone curse forever bug caused by negative monster index fixes https://github.com/diasurgical/devilutionX/issues/2550 --- Source/missiles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index ca76e11e1..d6bc5f44d 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -2557,8 +2557,8 @@ void AddStone(int mi, Point /*src*/, Point dst, int /*midir*/, int8_t /*mienemy* int mid = dMonster[tx][ty]; if (mid == 0) continue; - - auto &monster = Monsters[abs(mid) - 1]; + mid = abs(mid) - 1; + auto &monster = Monsters[mid]; if (IsAnyOf(monster.MType->mtype, MT_GOLEM, MT_DIABLO, MT_NAKRUL)) continue;