diff --git a/Source/drlg_l1.cpp b/Source/drlg_l1.cpp index 93e989425..f4e422cf7 100644 --- a/Source/drlg_l1.cpp +++ b/Source/drlg_l1.cpp @@ -1278,15 +1278,15 @@ static void DRLG_L5Subs() rv--; } - // BUGFIX: Add `&& y > 0` to the if statement. - if (i == 89) { + // BUGFIX: Add `&& y > 0` to the if statement. (fixed) + if (i == 89 && y > 0) { if (L5BTYPES[dungeon[x][y - 1]] != 79 || L5dflags[x][y - 1]) i = 79; else dungeon[x][y - 1] = 90; } - // BUGFIX: Add `&& x + 1 < DMAXX` to the if statement. - if (i == 91) { + // BUGFIX: Add `&& x + 1 < DMAXX` to the if statement. (fixed) + if (i == 91 && x + 1 < DMAXX) { if (L5BTYPES[dungeon[x + 1][y]] != 80 || L5dflags[x + 1][y]) i = 80; else