Skip to content

Commit aafe31c

Browse files
12Me21paramat
authored andcommittedSep 3, 2018
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_".
1 parent ef20f9e commit aafe31c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎mods/stairs/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
185185
local creative_enabled = (creative and creative.is_enabled_for
186186
and creative.is_enabled_for(player_name))
187187

188-
if under and under.name:find("stairs:slab_") then
188+
if under and under.name:find("^stairs:slab_") then
189189
-- place slab using under node orientation
190190
local dir = minetest.dir_to_facedir(vector.subtract(
191191
pointed_thing.above, pointed_thing.under), true)

0 commit comments

Comments
 (0)
Please sign in to comment.