From c5ff11f815eed6435134acabab2c6b6630f061ca Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 23 Apr 2011 23:59:42 -0700 Subject: [PATCH] Fixed issue with double spaces in command handling. --- src/com/sk89q/minecraft/util/commands/CommandContext.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/sk89q/minecraft/util/commands/CommandContext.java b/src/com/sk89q/minecraft/util/commands/CommandContext.java index e7b79b058..43a54b1c5 100644 --- a/src/com/sk89q/minecraft/util/commands/CommandContext.java +++ b/src/com/sk89q/minecraft/util/commands/CommandContext.java @@ -41,7 +41,9 @@ public class CommandContext { int i = 1; for (; i < args.length; i++) { - if (args[i].charAt(0) == '-' && args[i].matches("^-[a-zA-Z]+$")) { + if (args[i].length() == 0) { + // Ignore this + } else if (args[i].charAt(0) == '-' && args[i].matches("^-[a-zA-Z]+$")) { for (int k = 1; k < args[i].length(); k++) { flags.add(args[i].charAt(k)); }