Skip to content

Commit

Permalink
Also prevent items count by charge from stacking in the consume item …
Browse files Browse the repository at this point in the history
…menu
  • Loading branch information
Qrox committed Aug 3, 2019
1 parent fe33970 commit 53081e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inventory_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ static std::vector<std::list<item *>> restack_items( const std::list<item>::cons
for( auto it = from; it != to; ++it ) {
auto match = std::find_if( res.begin(), res.end(),
[ &it, check_components ]( const std::list<item *> &e ) {
return it->stacks_with( *const_cast<item *>( e.back() ), check_components );
return it->display_stacked_with( *const_cast<item *>( e.back() ), check_components );
} );

if( match != res.end() ) {
Expand All @@ -1045,7 +1045,7 @@ static std::vector<std::list<item *>> restack_items( const item_stack::const_ite
for( auto it = from; it != to; ++it ) {
auto match = std::find_if( res.begin(), res.end(),
[ &it, check_components ]( const std::list<item *> &e ) {
return it->stacks_with( *const_cast<item *>( e.back() ), check_components );
return it->display_stacked_with( *const_cast<item *>( e.back() ), check_components );
} );

if( match != res.end() ) {
Expand Down

0 comments on commit 53081e1

Please sign in to comment.