mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
Copy stack before accessing it in add_item
This commit is contained in:
parent
1f87874870
commit
ef08977112
1 changed files with 1 additions and 0 deletions
|
@ -210,6 +210,7 @@ end
|
||||||
|
|
||||||
local old_add_item = minetest.add_item
|
local old_add_item = minetest.add_item
|
||||||
function minetest.add_item(pos, stack)
|
function minetest.add_item(pos, stack)
|
||||||
|
stack = ItemStack(stack)
|
||||||
if minetest.get_item_group(stack:get_name(), "filled_map") > 0 then
|
if minetest.get_item_group(stack:get_name(), "filled_map") > 0 then
|
||||||
stack:set_name("mcl_maps:filled_map")
|
stack:set_name("mcl_maps:filled_map")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue