Skip to content

Commit

Permalink
Merge pull request #40099 from BevapDin/zeb
Browse files Browse the repository at this point in the history
Call `item::remove_item` on appropriate object.
  • Loading branch information
ZhilkinSerg authored May 3, 2020
2 parents b734971 + dedd73c commit da38caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7779,7 +7779,7 @@ bool item::reload( player &u, item_location loc, int qty )

if( ammo->charges == 0 && !ammo->has_flag( flag_SPEEDLOADER ) ) {
if( container != nullptr ) {
remove_item( container->contents.front() );
container->remove_item( container->contents.front() );
u.inv.restack( u ); // emptied containers do not stack with non-empty ones
} else {
loc.remove_item();
Expand Down

0 comments on commit da38caf

Please sign in to comment.