From ccd586ec81e1c220f3d5722a5757de7d6de27989 Mon Sep 17 00:00:00 2001 From: sk89q Date: Wed, 23 Feb 2011 00:31:49 -0800 Subject: [PATCH] Fixed an error the command parser that resulted it in handling commands it did not really handle. Closes #153. --- src/com/sk89q/worldedit/WorldEdit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/sk89q/worldedit/WorldEdit.java b/src/com/sk89q/worldedit/WorldEdit.java index a896aae81..106800f58 100644 --- a/src/com/sk89q/worldedit/WorldEdit.java +++ b/src/com/sk89q/worldedit/WorldEdit.java @@ -858,7 +858,8 @@ public class WorldEdit { if (commands.hasCommand(searchCmd)) { } else if (config.noDoubleSlash && commands.hasCommand("/" + searchCmd)) { split[0] = "/" + split[0]; - } else if (commands.hasCommand(searchCmd.substring(1))) { + } else if (split[0].length() >= 2 && split[0].charAt(0) == '/' + && commands.hasCommand(searchCmd.substring(1))) { split[0] = split[0].substring(1); }