From 968456defa4ca2dcc8bf49437fc02616dcc7433c Mon Sep 17 00:00:00 2001 From: sys4 Date: Fri, 6 Aug 2021 21:36:24 +0200 Subject: [PATCH] Fix crash when the node.name does not contain ':' --- stairsplus/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stairsplus/common.lua b/stairsplus/common.lua index 49a4e7e..f38d203 100644 --- a/stairsplus/common.lua +++ b/stairsplus/common.lua @@ -50,7 +50,7 @@ stairsplus.rotate_node_aux = function(itemstack, placer, pointed_thing) local under_node = minetest.get_node(under) local under_prefix = under_node and name_to_category(under_node.name) -- NALC Addition to avoid coloredwood/unifiedbricks crash by Sys4 - local under_pmod = string.sub(under_node.name, 1, string.find(under_node.name, ":")-1) + local under_pmod = string.sub(under_node.name, 1, (string.find(under_node.name, ":") or 0)-1) local same_cat = item_prefix == under_prefix