From aafe31c14ea41afbb243c9443658863bd9460b6b Mon Sep 17 00:00:00 2001
From: 12Me21 <12Me21.MC@gmail.com>
Date: Sun, 2 Sep 2018 22:34:56 -0400
Subject: [PATCH] Stairs: Safer slab name check

Before, it checked if the node name *contained* "stairs:slab_", which could detect
things like "xxxxxstairs:slab_xxxx". Changed the pattern to "^stairs:slab_".
---
 mods/stairs/init.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mods/stairs/init.lua b/mods/stairs/init.lua
index f6511187..0bbb034b 100644
--- a/mods/stairs/init.lua
+++ b/mods/stairs/init.lua
@@ -185,7 +185,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
 			local creative_enabled = (creative and creative.is_enabled_for
 					and creative.is_enabled_for(player_name))
 
-			if under and under.name:find("stairs:slab_") then
+			if under and under.name:find("^stairs:slab_") then
 				-- place slab using under node orientation
 				local dir = minetest.dir_to_facedir(vector.subtract(
 					pointed_thing.above, pointed_thing.under), true)
-- 
GitLab