OSDN Git Service

床上のアイテムの自動破壊で一番上のアイテムを破壊した所でループが終って
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 24 Sep 2002 08:44:25 +0000 (08:44 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 24 Sep 2002 08:44:25 +0000 (08:44 +0000)
しまってその下のアイテムを破壊してくれなかったバグ修正。

src/autopick.c

index 11001f5..45106e0 100644 (file)
@@ -1103,8 +1103,13 @@ void delayed_auto_destroy(void)
                 delayed_auto_destroy_aux(item);
 
        /* Scan the pile of objects */
-        for (item = cave[py][px].o_idx; item; item = o_list[item].next_o_idx)
+        item = cave[py][px].o_idx;
+        while (item)
+        {
+                int next = o_list[item].next_o_idx;
                 delayed_auto_destroy_aux(-item);
+                item = next;
+        }
 }