]> granicus.if.org Git - nethack/commitdiff
hmon() arg fix
authorPatR <rankin@nethack.org>
Sun, 1 Oct 2017 15:16:56 +0000 (08:16 -0700)
committerPatR <rankin@nethack.org>
Sun, 1 Oct 2017 15:16:56 +0000 (08:16 -0700)
The call to hmon() in flooreffects() was passing a boolean where int
is expected.  The 'thrown' argument may have once been a boolean, but
it is 'int' for as far back as the repository history goes.

src/do.c

index 84a1f8b23b56fb06bd86af5e70f2bb920520d0a5..28d74508217c116fe41b325c6a4fe1f4c7e4032c 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -159,7 +159,9 @@ const char *verb;
             if (mtmp) {
                 if (!passes_walls(mtmp->data) && !throws_rocks(mtmp->data)) {
                     int dieroll = rnd(20);
-                    if (hmon(mtmp, obj, TRUE, dieroll) && !is_whirly(mtmp->data))
+
+                    if (hmon(mtmp, obj, HMON_THROWN, dieroll)
+                        && !is_whirly(mtmp->data))
                         return FALSE; /* still alive */
                 }
                 mtmp->mtrapped = 0;