]> granicus.if.org Git - nethack/commitdiff
fix github issue #462 - line not displayed
authorPatR <rankin@nethack.org>
Wed, 17 Feb 2021 22:27:00 +0000 (14:27 -0800)
committerPatR <rankin@nethack.org>
Wed, 17 Feb 2021 22:27:00 +0000 (14:27 -0800)
Fix a latent bug in unreachable code.  As the comment preceding
the cited code states, hero polymorphed into an eel isn't offered
a chance to use #monster to hide, so program execution won't ever
get to the bad code.  Using formatting routine The() where message
delivery routine pline_The() is intended is certainly a bug though.

Fixes #462

src/polyself.c

index fd3567da870d157287818fe31c67fde8aed5e09a..cb39e6e09a7f92f4f13951945683994b3895d50e 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 polyself.c      $NHDT-Date: 1605959204 2020/11/21 11:46:44 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.157 $ */
+/* NetHack 3.7 polyself.c      $NHDT-Date: 1613600809 2021/02/17 22:26:49 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.160 $ */
 /*      Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1525,7 +1525,7 @@ dohide(void)
        such critters aren't offered the option of hiding via #monster */
     if (g.youmonst.data->mlet == S_EEL && !is_pool(u.ux, u.uy)) {
         if (IS_FOUNTAIN(levl[u.ux][u.uy].typ))
-            The("fountain is not deep enough to hide in.");
+            pline_The("fountain is not deep enough to hide in.");
         else
             There("is no %s to hide in here.", hliquid("water"));
         u.uundetected = 0;