]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix a crash that happened when trying to shift the cuboid using relative direction...
authorDaniel Sosa <sosa.daniel23@gmail.com>
Sun, 11 Jan 2015 13:12:37 +0000 (13:12 +0000)
committerDaniel Sosa <sosa.daniel23@gmail.com>
Mon, 4 Jul 2016 02:44:02 +0000 (21:44 -0500)
worldedit_commands/cuboid.lua

index 35f2bfcd3278a8ef4e24a65db2046822581e18cd..9bc2822ff04556993f61f5dc7c2c4e7c189cadd2 100644 (file)
@@ -108,6 +108,10 @@ minetest.register_chatcommand("/shift", {
                        axis, dir = worldedit.player_axis(name)
                end
                
+               if axis == nil or dir == nil then
+                       return false, "Invalid if looking up or down"
+               end
+               
                assert(worldedit.cuboid_shift(name, axis, amount * dir))
                worldedit.marker_update(name)