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'.
This commit is contained in:
Pasi Kallinen
2016-01-15 12:37:58 +02:00
parent 2a0c69700f
commit 9f4d8d9301

View File

@@ -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