From 9f4d8d9301dd7a9aa7846439422e6e412376b65b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 15 Jan 2016 12:37:58 +0200 Subject: [PATCH] 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'. --- src/pager.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.40.0