Permalink
Browse files

Correct far-look when a monster is seen in a trap

The trapexplain array is zero-based, but trap IDs start at one, causing
odd descriptions like "a dwarf trapped in a statue trap" when a dwarf
stuck in a web was far-looked.

This bug also exists in upstream NitroHack.
  • Loading branch information...
1 parent c8a21c3 commit 6a07d2b7f7aeab5a31ad795dd21eaf824ffefa92 @tung committed May 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 libnitrohack/src/pager.c
View
@@ -346,7 +346,7 @@ static void describe_mon(int x, int y, int monnum, char *buf)
/* newsym lets you know of the trap, so mention it here */
if (tt == BEAR_TRAP || tt == PIT ||
tt == SPIKED_PIT || tt == WEB)
- sprintf(eos(buf), ", trapped in %s", an(trapexplain[tt]));
+ sprintf(eos(buf), ", trapped in %s", an(trapexplain[tt-1]));
}
mon_vision_summary(mtmp, visionbuf);

0 comments on commit 6a07d2b

Please sign in to comment.