diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 4eec2daf9..8fadd8e14 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -619,6 +619,9 @@ similar "The ogre lord yanks Cleaver from your corpses!" due to caching the next item, to avoid churning through the whole pool of obufs gas clouds are a little random in how they spread out from a point Izchak occasionally stocks wands/scrolls/spellbooks of light +data tracking for #overview was mis-using u.urooms[] and after being in a + situation where hero was in multiple rooms at once, visiting other + levels might flag unvisisted rooms as having been visited Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/dungeon.c b/src/dungeon.c index 5738a36a5..6d536cc83 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -2765,6 +2765,7 @@ recalc_mapseen(void) struct trap *t; unsigned i, ridx, atmp; int x, y, ltyp, count; + char uroom; /* Should not happen in general, but possible if in the process * of being booted from the quest. The mapseen object gets @@ -2816,18 +2817,14 @@ recalc_mapseen(void) /* flags.msanctum, .valley, and .vibrating_square handled below */ /* track rooms the hero is in */ - for (i = 0; i < SIZE(u.urooms); ++i) { - if (!u.urooms[i]) - continue; - - ridx = u.urooms[i] - ROOMOFFSET; + for (i = 0; (uroom = u.urooms[i]) != '\0'; ++i) { + ridx = (unsigned) uroom - ROOMOFFSET; mptr->msrooms[ridx].seen = 1; mptr->msrooms[ridx].untended = (g.rooms[ridx].rtype >= SHOPBASE) - ? (!(mtmp = shop_keeper(u.urooms[i])) || !inhishop(mtmp)) + ? (!(mtmp = shop_keeper(uroom)) || !inhishop(mtmp)) : (g.rooms[ridx].rtype == TEMPLE) - ? (!(mtmp = findpriest(u.urooms[i])) - || !inhistemple(mtmp)) + ? (!(mtmp = findpriest(uroom)) || !inhistemple(mtmp)) : 0; }