From 721460e3752ea8fe0731efc8aad0ffa490034900 Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Thu, 29 Apr 2021 00:13:53 +0200 Subject: [PATCH] missiles: add BUGFIX for PutMissile Prior to this commit, if the player was standing on coodinate with x=0 or y=0, no missile would be created when casting a spell. This is due to an off-by-one when doing bounds-checking. --- Source/missiles.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 12b49a631..be6747cdd 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -462,6 +462,7 @@ void PutMissile(int i) x = missile[i]._mix; y = missile[i]._miy; + // BUGFIX: should be `x < 0 || y < 0`, was `x <= 0 || y <= 0`. if (x <= 0 || y <= 0 || x >= MAXDUNX || y >= MAXDUNY) missile[i]._miDelFlag = TRUE; if (!missile[i]._miDelFlag) {