From 9866b0765415586a8aead8d1a45d3f0a404af4ea Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:12:53 +0200 Subject: [PATCH] Fix potential freeze in core.check_for_falling --- builtin/game/falling.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua index bfa8da252..22218de85 100644 --- a/builtin/game/falling.lua +++ b/builtin/game/falling.lua @@ -513,16 +513,16 @@ function core.check_single_for_falling(p) if same and d_bottom.paramtype2 == "leveled" and core.get_node_level(p_bottom) < core.get_node_max_level(p_bottom) then - convert_to_falling_node(p, n) - return true + local success = convert_to_falling_node(p, n) + return success end -- Otherwise only if the bottom node is considered "fall through" if not same and (not d_bottom.walkable or d_bottom.buildable_to) and (core.get_item_group(n.name, "float") == 0 or d_bottom.liquidtype == "none") then - convert_to_falling_node(p, n) - return true + local success = convert_to_falling_node(p, n) + return success end end end