From: nhmall Date: Mon, 4 Jul 2022 02:26:21 +0000 (-0400) Subject: autodescribe fix for 'I' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15602af8b40c484ea5ed5489cfc67aa3547c3668;p=nethack autodescribe fix for 'I' > Attempting to look at 'I' (remembered, unseen monster) > with farlook/quicklook/getpos autodescribe mis-reports it > as "unexplored area". --- diff --git a/src/pager.c b/src/pager.c index cecf7f270..a3d30b267 100644 --- a/src/pager.c +++ b/src/pager.c @@ -605,6 +605,8 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf) } else { Strcpy(buf, "unexplored area"); } + } else if (glyph_is_invisible(glyph)) { + /* already handled */ } else if (!glyph_is_cmap(glyph)) { Strcpy(buf, "unexplored area"); } else { @@ -1377,7 +1379,8 @@ do_screen_description(coord cc, boolean looked, int sym, char *out_str, if (pm && for_supplement) *for_supplement = pm; - *firstmatch = look_buf; + if (look_buf[0] != '\0') + *firstmatch = look_buf; if (*(*firstmatch)) { Snprintf(temp_buf, sizeof temp_buf, " (%s)", *firstmatch); (void) strncat(out_str, temp_buf,