From: Pasi Kallinen Date: Fri, 15 Jan 2016 10:37:58 +0000 (+0200) Subject: Warning glyph description is wrong when trap symbol is same X-Git-Tag: NetHack-3.6.1_RC01~1022 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f4d8d9301dd7a9aa7846439422e6e412376b65b;p=nethack Warning glyph description is wrong when trap symbol is same This fixes bz23: Warning glyph info wrong with TRAPS=50, even though you don't set the trap symbols via TRAPS anymore, the bug still existed. To trigger it, use SYMBOL=S_arrow_trap:2 and look at monster that appears as warning '2'. --- diff --git a/src/pager.c b/src/pager.c index 8157bce8e..a273453f5 100644 --- a/src/pager.c +++ b/src/pager.c @@ -316,6 +316,9 @@ char *buf, *monbuf; int tnum = what_trap(glyph_to_trap(glyph)); Strcpy(buf, defsyms[trap_to_defsym(tnum)].explanation); + } else if (glyph_is_warning(glyph)) { + int warnindx = glyph_to_warning(glyph); + Strcpy(buf, def_warnsyms[warnindx].explanation); } else if (!glyph_is_cmap(glyph)) { Strcpy(buf, "unexplored area"); } else