diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 732fb821acd1e..04132b9ff3e19 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -3943,8 +3943,8 @@ void inventory_multiselector::on_input( const inventory_input &input ) if( entry.is_selectable() ) { size_t const count = entry.chosen_count; size_t const max = entry.get_available_count(); - size_t const newcount = std::clamp( 0, - count + ( input.action == "INCREASE_COUNT" ? +1 : -1 ), + size_t const newcount = std::clamp( count + ( input.action == "INCREASE_COUNT" ? +1 : -1 ), + 0, max ); toggle_entry( entry, newcount ); }