OSDN Git Service

[fix] #65 未初期化の変数を参照している
[hengbandforosx/hengbandosx.git] / src / floor / floor-object.c
index 01d7b4c..254ceec 100644 (file)
@@ -6,9 +6,10 @@
  */
 
 #include "floor/floor-object.h"
+#include "artifact/fixed-art-generator.h"
 #include "flavor/flavor-describer.h"
 #include "flavor/object-flavor-types.h"
-#include "floor/floor.h"
+#include "floor/cave.h"
 #include "game-option/birth-options.h"
 #include "game-option/cheat-options.h"
 #include "game-option/cheat-types.h"
@@ -19,7 +20,6 @@
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
 #include "object-enchant/apply-magic.h"
-#include "object-enchant/artifact.h"
 #include "object-enchant/item-apply-magic.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-hook/hook-checker.h"
 #include "object/object-stack.h"
 #include "perception/object-perception.h"
 #include "system/alloc-entries.h"
+#include "system/artifact-type-definition.h"
+#include "system/floor-type-definition.h"
 #include "system/system-variables.h"
+#include "target/projection-path-calculator.h"
 #include "util/bit-flags-calculator.h"
 #include "view/display-messages.h"
 #include "wizard/wizard-messages.h"
@@ -617,6 +620,10 @@ void floor_item_describe(player_type *owner_ptr, INVENTORY_IDX item)
 object_type *choose_object(player_type *owner_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, tval_type tval)
 {
     OBJECT_IDX item;
+
+    if (idx)
+        *idx = INVEN_NONE;
+
     if (!get_item(owner_ptr, &item, q, s, option, tval))
         return NULL;