mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Fix wrong number of items in allow_metadata_inventory_put/take callbacks (#10990)
This commit is contained in:
parent
bbf4f7ae54
commit
29681085b9
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ItemStack src_item = list_from->getItem(from_i);
|
ItemStack src_item = list_from->getItem(from_i);
|
||||||
if (count > 0)
|
if (count > 0 && count < src_item.count)
|
||||||
src_item.count = count;
|
src_item.count = count;
|
||||||
if (src_item.empty())
|
if (src_item.empty())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue