OSDN Git Service

[Fix] #38997 cmd-eat.c 内変数参照修正. / Fix variable references in cmd-eat.c.
authordeskull <deskull@users.sourceforge.jp>
Fri, 3 Jan 2020 15:04:05 +0000 (00:04 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Fri, 3 Jan 2020 15:04:05 +0000 (00:04 +0900)
src/cmd/cmd-eat.c

index dff398e..6679ca0 100644 (file)
@@ -39,7 +39,7 @@ void exe_eat_food(player_type *creature_ptr, INVENTORY_IDX item)
 
        if (music_singing_any(creature_ptr)) stop_singing(creature_ptr);
        if (hex_spelling_any(creature_ptr)) stop_hex_spell_all(creature_ptr);
-       o_ptr = REF_ITEM(creature_ptr, p_ptr->current_floor_ptr, item);
+       o_ptr = REF_ITEM(creature_ptr, creature_ptr->current_floor_ptr, item);
 
        sound(SOUND_EAT);
 
@@ -486,7 +486,7 @@ void do_cmd_eat_food(player_type *creature_ptr)
        q = _("どれを食べますか? ", "Eat which item? ");
        s = _("食べ物がない。", "You have nothing to eat.");
 
-       if (!choose_object(p_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0)) return;
+       if (!choose_object(creature_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0)) return;
 
        exe_eat_food(creature_ptr, item);
 }