From c34ff0ffd1bfc24eef616e511d626cf30a8265d0 Mon Sep 17 00:00:00 2001 From: joveeater Date: Sat, 4 Nov 2023 12:12:24 +0000 Subject: [PATCH] fix: debugmsg when removing npc armor (#3544) * Fix debugmsg when removing npc armor * style(autofix.ci): automated formatting --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- src/armor_layers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/armor_layers.cpp b/src/armor_layers.cpp index da870f9f1896..e49e50a55251 100644 --- a/src/armor_layers.cpp +++ b/src/armor_layers.cpp @@ -897,7 +897,8 @@ void show_armor_layers_ui( Character &who ) if( you.query_yn( _( "Remove selected armor?" ) ) ) { do_return_entry(); // remove the item, asking to drop it if necessary - who.as_player()->takeoff( **access_tmp_worn( leftListIndex ) ); + item &to_takeoff = **access_tmp_worn( leftListIndex ); + who.as_player()->takeoff( to_takeoff ); if( !you.has_activity( ACT_ARMOR_LAYERS ) ) { // An activity has been created to take off the item; // we must surrender control until it is done.