]> granicus.if.org Git - nethack/commitdiff
autodescribe fix for 'I'
authornhmall <nhmall@nethack.org>
Mon, 4 Jul 2022 02:26:21 +0000 (22:26 -0400)
committernhmall <nhmall@nethack.org>
Mon, 4 Jul 2022 02:26:21 +0000 (22:26 -0400)
> Attempting to look at 'I' (remembered, unseen monster)
> with farlook/quicklook/getpos autodescribe mis-reports it
> as "unexplored area".

src/pager.c

index cecf7f2702bd2d79908885c73e5085b0f84e11af..a3d30b2676d3c4e122cfda275a98124390615b85 100644 (file)
@@ -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,