mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-06-30 23:20:44 +02:00
Fix crash when the node.name does not contain ':'
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user