mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-27 07:02:59 +00:00
Fix memory leak & C stack overflow
Before this patch, when placing a fire above a node that would turn it into eternal fire (e.g. Netherrack or Magma) the spawn_fire() function would call itself infinitely via the on_construct() handler of eternal fire – because the latter called spawn_fire() itself. On an x86 machine, this caused a memory leak, hanging Minetest. On an x86_64 machine though, Minetest crashed immediately, showing an error message about a stack overflow.
This commit is contained in:
parent
4647710945
commit
f5ba6f5649
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ minetest.register_node("mcl_fire:fire", {
|
|||
|
||||
local dim = mcl_worlds.pos_to_dimension(bpos)
|
||||
if under == "mcl_nether:magma" or under == "mcl_nether:netherrack" or (under == "mcl_core:bedrock" and dim == "end") then
|
||||
spawn_fire(pos)
|
||||
minetest.set_node(pos, {name="mcl_fire:eternal_fire"})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_portals") then
|
||||
|
|
Loading…
Reference in a new issue