Fix wrong number of items in allow_metadata_inventory_put/take callbacks ()

This commit is contained in:
savilli 2021-02-23 21:36:55 +03:00 committed by GitHub
parent bbf4f7ae54
commit 29681085b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;