Skip to content
Permalink
Browse files

Fix wrong number of items in allow_metadata_inventory_put/take callba…

…cks (#10990)
  • Loading branch information
savilli committed Feb 23, 2021
1 parent bbf4f7a commit 29681085b9762e8cf0e953014ca0e8d2890713ef
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/inventorymanager.cpp
@@ -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;

0 comments on commit 2968108

Please sign in to comment.