Skip to content

Commit

Permalink
Fix wrong number of items in allow_metadata_inventory_put/take callba…
Browse files Browse the repository at this point in the history
…cks (#10990)
  • Loading branch information
savilli committed Feb 23, 2021
1 parent bbf4f7a commit 2968108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inventorymanager.cpp
Expand Up @@ -340,7 +340,7 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
*/

ItemStack src_item = list_from->getItem(from_i);
if (count > 0)
if (count > 0 && count < src_item.count)
src_item.count = count;
if (src_item.empty())
return;
Expand Down

0 comments on commit 2968108

Please sign in to comment.