DanielT / NitroHack

A fork of NetHack 3.4.3
nitrohack.org
21 stars 2 forks source link

Monster in web trap described as "trapped in a statue trap" in far-look #29

Open tung opened 12 years ago

tung commented 12 years ago

An off-by-one error when accessing the trapexplain array at line 347 of libnitrohack/src/pray.c causes far-look to report e.g. "a dwarf trapped in a statue trap" when it's trapped in a web.

This line:

sprintf(eos(buf), ", trapped in %s", an(trapexplain[tt]));

... should look like this, like all other uses of trapexplain in the code:

sprintf(eos(buf), ", trapped in %s", an(trapexplain[tt-1]));

See this with context in this commit on my experimental branch.