Skip to content

Commit

Permalink
Update src/inventory.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: sfan5 <sfan5@live.de>
  • Loading branch information
andriyndev and sfan5 authored Feb 9, 2025
1 parent 611cb89 commit 6a96aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ ItemStack InventoryList::removeItem(const ItemStack &item, bool match_meta)
{
ItemStack removed;
for (auto i = m_items.rbegin(); i != m_items.rend(); ++i) {
if (i->name == item.name && (!match_meta || (i->metadata == item.metadata))) {
if (i->name == item.name && (!match_meta || i->metadata == item.metadata)) {
u32 still_to_remove = item.count - removed.count;
ItemStack leftover = removed.addItem(i->takeItem(still_to_remove),
m_itemdef);
Expand Down

0 comments on commit 6a96aaa

Please sign in to comment.