forked from minetest-mods/moreblocks
Fix crash when the node.name does not contain ':'
This commit is contained in:
parent
46d347c00a
commit
968456defa
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user