]> granicus.if.org Git - nethack/commitdiff
Fix: nymph theft vs monster
authorMichael Meyer <me@entrez.cc>
Wed, 5 May 2021 22:51:26 +0000 (18:51 -0400)
committerPasi Kallinen <paxed@alt.org>
Thu, 6 May 2021 15:00:06 +0000 (18:00 +0300)
Nymphs' item theft attack against other monsters was broken in 1696019,
when a break used to select a particular item in the target monster's
inventory was changed to an early return.

src/uhitm.c

index 2085e5deedf9d96be488a33b4451b2161b9bfee4..84da9f0f89154ef63adb5ba9c2707b8a82965375 100644 (file)
@@ -3946,7 +3946,7 @@ mhitm_ad_sedu(struct monst *magr, struct attack *mattk, struct monst *mdef,
         /* find an object to steal, non-cursed if magr is tame */
         for (obj = mdef->minvent; obj; obj = obj->nobj)
             if (!magr->mtame || !obj->cursed)
-                return;
+                break;
 
         if (obj) {
             char buf[BUFSZ];