From 29681085b9762e8cf0e953014ca0e8d2890713ef Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Tue, 23 Feb 2021 21:36:55 +0300 Subject: [PATCH] Fix wrong number of items in allow_metadata_inventory_put/take callbacks (#10990) --- src/inventorymanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index 554708e8e..1e81c1dbc 100644 --- a/src/inventorymanager.cpp +++ b/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;