Copy stack before accessing it in add_item

This commit is contained in:
Elias Fleckenstein 2021-05-02 17:11:33 +02:00 committed by Nils Dagsson Moskopp
parent 697a37c266
commit 8f077ff55b
No known key found for this signature in database
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 0 deletions

View File

@ -209,6 +209,7 @@ end
local old_add_item = minetest.add_item
function minetest.add_item(pos, stack)
stack = ItemStack(stack)
if minetest.get_item_group(stack:get_name(), "filled_map") > 0 then
stack:set_name("mcl_maps:filled_map")
end