From 489d56d4bb5c32d257bcc071b9056f9496434b38 Mon Sep 17 00:00:00 2001
From: Pasi Kallinen <paxed@alt.org>
Date: Fri, 13 Nov 2015 00:06:07 +0200
Subject: [PATCH] Fix hiding under nothing when corpse rotted away

---
 src/dig.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/dig.c b/src/dig.c
index 17fcf4553..0d1c24187 100644
--- a/src/dig.c
+++ b/src/dig.c
@@ -1983,7 +1983,8 @@ long timeout;
         if (mtmp && !OBJ_AT(x, y) && mtmp->mundetected
             && hides_under(mtmp->data)) {
             mtmp->mundetected = 0;
-        }
+        } else if (x == u.ux && y == u.uy && u.uundetected && hides_under(youmonst.data))
+            (void) hideunder(&youmonst);
         newsym(x, y);
     } else if (in_invent)
         update_inventory();
-- 
2.40.0