]> granicus.if.org Git - nethack/commitdiff
Add missing thrownobj clears when the obj is destroyed
authorPasi Kallinen <paxed@alt.org>
Thu, 15 Oct 2015 11:56:42 +0000 (14:56 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 15 Oct 2015 11:56:42 +0000 (14:56 +0300)
src/dothrow.c

index ac447714d4c58a8ca7cc5fd5fc5067dfc0576a17..91ffef4c0bd6c0da825bb4e332c788b137ab30b1 100644 (file)
@@ -1231,10 +1231,13 @@ boolean
             tmp_at(DISP_END, 0);
             breakmsg(obj, cansee(bhitpos.x, bhitpos.y));
             breakobj(obj, bhitpos.x, bhitpos.y, TRUE, TRUE);
+            thrownobj = (struct obj *) 0;
             return;
         }
-        if (flooreffects(obj, bhitpos.x, bhitpos.y, "fall"))
+        if (flooreffects(obj, bhitpos.x, bhitpos.y, "fall")) {
+            thrownobj = (struct obj *) 0;
             return;
+        }
         obj_no_longer_held(obj);
         if (mon && mon->isshk && is_pick(obj)) {
             if (cansee(bhitpos.x, bhitpos.y))