]> granicus.if.org Git - nethack/commitdiff
Fix Cleaving giving dmonsfree warning
authorPasi Kallinen <paxed@alt.org>
Fri, 2 Mar 2018 13:49:45 +0000 (15:49 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 2 Mar 2018 13:52:27 +0000 (15:52 +0200)
Due to inverted logic, hitting a blue jelly with the Cleaver could cause
a dmonsfree warning - the jelly would die, but then come back to life
via the passive attack.  This is a post-3.6.0 bug

src/uhitm.c

index daa069cc471c9df3e6b5d30cb9f164f3fd0ce46d..6807df05617a0323535e28de14a37fc58d4214e8 100644 (file)
@@ -540,7 +540,7 @@ struct attack *uattk;
         mhit = (tmp > dieroll);
         result = known_hitum(mtmp, uwep, &mhit, tmp, armorpenalty,
                              uattk, dieroll);
-        (void) passive(mtmp, uwep, mhit, DEADMONSTER(mtmp), AT_WEAP, !uwep);
+        (void) passive(mtmp, uwep, mhit, !DEADMONSTER(mtmp), AT_WEAP, !uwep);
         if (mon == mtmp)
             malive = result;
     }