vauld guard was maintaining a temporary corridor or while a monster
with eshk, epri, or egd data was off level, that data became invalid
blessed potion of polymorph will prompt user for monster to poly into
+out of array bounds access attempt occurred when deciding whether to bounce
+ if wand or spell zap reached edge of map
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
boolean fireball;
make_bounce:
- bchance = (levl[sx][sy].typ == STONE) ? 10
- : (In_mines(&u.uz) && IS_WALL(levl[sx][sy].typ)) ? 20
- : 75;
+ bchance = (!isok(sx, sy) || levl[sx][sy].typ == STONE) ? 10
+ : (In_mines(&u.uz) && IS_WALL(levl[sx][sy].typ)) ? 20
+ : 75;
bounce = 0;
fireball = (type == ZT_SPELL(ZT_FIRE));
if ((--range > 0 && isok(lsx, lsy) && cansee(lsx, lsy))
if (type == ZT_SPELL(ZT_FIRE))
explode(sx, sy, type, d(12, 6), 0, EXPL_FIERY);
if (shopdamage)
- pay_for_damage(abstype == ZT_FIRE
- ? "burn away"
- : abstype == ZT_COLD
- ? "shatter"
- /* "damage" indicates wall rather than door */
- : abstype == ZT_ACID
- ? "damage"
- : abstype == ZT_DEATH
- ? "disintegrate"
- : "destroy",
+ pay_for_damage(abstype == ZT_FIRE ? "burn away"
+ : abstype == ZT_COLD ? "shatter"
+ /* "damage" indicates wall rather than door */
+ : abstype == ZT_ACID ? "damage"
+ : abstype == ZT_DEATH ? "disintegrate"
+ : "destroy",
FALSE);
g.bhitpos = save_bhitpos;
}