From b8488bde775dcdbae008168807de03cdc47d9398 Mon Sep 17 00:00:00 2001 From: KorGgenT Date: Wed, 6 May 2020 14:04:30 -0400 Subject: [PATCH] fix debug message when trying to pick up an item you can pick up --- src/pickup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pickup.cpp b/src/pickup.cpp index 36c1fdde5167f..1c25a75a1528b 100644 --- a/src/pickup.cpp +++ b/src/pickup.cpp @@ -261,9 +261,9 @@ bool pick_one_up( item_location &loc, int quantity, bool &got_water, bool &offer bool did_prompt = false; if( newit.count_by_charges() ) { - newit.charges = u.i_add_to_container( newit, false ); + newit.charges -= u.i_add( newit ).charges; } - if( newit.is_ammo() && newit.charges == 0 ) { + if( newit.is_ammo() && newit.charges <= 0 ) { picked_up = true; option = NUM_ANSWERS; //Skip the options part } else if( newit.is_frozen_liquid() ) {