From 421c7b8fd0c5c136bc32dc7e8f05dc6b0100e534 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 22 Mar 2015 13:34:59 +0100 Subject: [PATCH] Fixed crash with nil values for /orient --- mods/WorldEdit/worldedit_commands/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/WorldEdit/worldedit_commands/init.lua b/mods/WorldEdit/worldedit_commands/init.lua index e97f304b..1522ecd0 100755 --- a/mods/WorldEdit/worldedit_commands/init.lua +++ b/mods/WorldEdit/worldedit_commands/init.lua @@ -802,6 +802,10 @@ minetest.register_chatcommand("/orient", { worldedit.player_notify(name, count .. " nodes oriented") end, function(name, param) + if param == nil then + minetest.log("error","No parameters given to /orient WE's command!") + return + end local found, _, angle = param:find("^([+-]?%d+)$") if found == nil then worldedit.player_notify(name, "invalid usage: " .. param)