]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix wrong number of items in allow_metadata_inventory_put/take callbacks (#10990)
authorsavilli <78875209+savilli@users.noreply.github.com>
Tue, 23 Feb 2021 18:36:55 +0000 (21:36 +0300)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 18:36:55 +0000 (19:36 +0100)
src/inventorymanager.cpp

index 554708e8e62c773a385109da889ab12d26ffb698..1e81c1dbc8e57941b81325c58655a1d617e35e0f 100644 (file)
@@ -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;