存階に戻った場合, lite_spot()が呼ばれた際に配列外アクセスを起こして強
制終了する場合があるバグを修正. また, monster_drop_carried_objects()
内でのo_ptr->held_m_idxの扱いがおかしく, モンスターがアイテムを落とす
度に座標(0,0)が再描画されていたバグも修正.
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
- /* Hack -- efficiency */
- o_ptr->held_m_idx = 0;
+ /*
+ * o_ptr->held_m_idx is needed in delete_object_idx()
+ * to prevent calling lite_spot()
+ */
/* Delete the object */
delete_object_idx(this_o_idx);
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
- /* Paranoia */
- o_ptr->held_m_idx = 0;
-
/* Get local object */
q_ptr = &forge;
/* Copy the object */
object_copy(q_ptr, o_ptr);
+ /* Forget monster */
+ q_ptr->held_m_idx = 0;
+
/* Delete the object */
delete_object_idx(this_o_idx);