From b48c735d2e243068f9e70d604f54fc0a43e8652d Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sat, 26 Jan 2013 15:26:25 -0800 Subject: [PATCH] Correct handling of arguments where the arg is a quotation character followed by a space. Fixes WORLDEDIT-2633 --- .../java/com/sk89q/minecraft/util/commands/CommandContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/minecraft/util/commands/CommandContext.java b/src/main/java/com/sk89q/minecraft/util/commands/CommandContext.java index 604b4d1a3..0a36b7e98 100644 --- a/src/main/java/com/sk89q/minecraft/util/commands/CommandContext.java +++ b/src/main/java/com/sk89q/minecraft/util/commands/CommandContext.java @@ -79,7 +79,7 @@ public class CommandContext { int endIndex; for (endIndex = i; endIndex < args.length; ++endIndex) { final String arg2 = args[endIndex]; - if (arg2.charAt(arg2.length() - 1) == quotedChar) { + if (arg2.charAt(arg2.length() - 1) == quotedChar && arg2.length() > 1) { if (endIndex != i) build.append(' '); build.append(arg2.substring(endIndex == i ? 1 : 0, arg2.length() - 1)); break;