From 730244056cb9e7b0e40e2d79fee0ded35e9a638f Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 4 Jun 2011 12:22:33 -0700 Subject: [PATCH] Fixed a mask parsing error that raised java.lang.StringIndexOutOfBoundsException. --- src/main/java/com/sk89q/worldedit/WorldEdit.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index de65436e6..835f3f297 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -415,6 +415,10 @@ public class WorldEdit { for (String component : maskString.split(" ")) { Mask current = null; + if (component.length() == 0) { + continue; + } + if (component.charAt(0) == '#') { if (component.equalsIgnoreCase("#existing")) { current = new ExistingBlockMask();