From 9f060f16d26749261ea2fad9de1dd8c15f2f0fcb Mon Sep 17 00:00:00 2001 From: Valiant Date: Mon, 7 Oct 2024 10:39:27 +0400 Subject: [PATCH] Made `to_wear` reference --- src/character_attire.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character_attire.cpp b/src/character_attire.cpp index 6d79cac02c086..efa3ea75011f1 100644 --- a/src/character_attire.cpp +++ b/src/character_attire.cpp @@ -262,7 +262,7 @@ Character::wear( int pos, bool interactive ) std::optional::iterator> Character::wear( item_location item_wear, bool interactive ) { - item to_wear = *item_wear; + item &to_wear = *item_wear; // Need to account for case where we're trying to wear something that belongs to someone else if( !avatar_action::check_stealing( *this, to_wear ) ) {