From b962ace8a859af19faed0992cd9f86c93c43c5ce Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 26 Dec 2021 22:45:37 +0000 Subject: [PATCH] //maze, //maze3d: Fix crash if no arguments are specified --- CHANGELOG.md | 1 + worldeditadditions_commands/commands/maze.lua | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3575fe0..214881a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Note to self: See the bottom of this file for the release template text. - Cloud wand: Improve chat message text - Fix `bonemeal` mod detection to look for the global `bonemeal`, not whether the `bonemeal` mod name has been loaded - `//walls`: Prevent crash if not parameters are specified by defaulting to `dirt` as the replace_node + - `//maze`, `//maze3d`: Fix crash if no arguments are specified ## v1.12: The selection tools update (26th June 2021) diff --git a/worldeditadditions_commands/commands/maze.lua b/worldeditadditions_commands/commands/maze.lua index a02c7de..0d84466 100644 --- a/worldeditadditions_commands/commands/maze.lua +++ b/worldeditadditions_commands/commands/maze.lua @@ -1,7 +1,10 @@ +local wea = worldeditadditions local we_c = worldeditadditions_commands local function parse_params_maze(params_text, is_3d) - if not params_text then + if not params_text then params_text = "" end + params_text = wea.trim(params_text) + if #params_text == 0 then return false, "No arguments specified" end