Browse Source

Fix OOBs in DRLG_L5Subs (#402)

Refs #396
pull/400/head^2
Gleb Mazovetskiy 6 years ago committed by Anders Jenbo
parent
commit
f2afd88633
  1. 8
      Source/drlg_l1.cpp

8
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

Loading…
Cancel
Save