From: PatR Date: Sun, 1 Oct 2017 15:16:56 +0000 (-0700) Subject: hmon() arg fix X-Git-Tag: NetHack-3.6.1_RC01~329 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f18524bef92ba59b3fb884935d0c441fa3c323f4;p=nethack hmon() arg fix 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. --- diff --git a/src/do.c b/src/do.c index 84a1f8b23..28d745082 100644 --- 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;