From da6103c33ea9160d1658f5f312c3f6ee7e8d78f8 Mon Sep 17 00:00:00 2001 From: Albert Pham Date: Mon, 25 Feb 2013 00:14:17 -0800 Subject: [PATCH] Fixed WORLDEDIT-2707, regex in WorldEdit.getBlockPattern() Regex in WorldEdit.getBlockPattern() was overly complex. --- src/main/java/com/sk89q/worldedit/WorldEdit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index 34653a44c..027df492c 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -671,7 +671,7 @@ public class WorldEdit { double chance; // Parse special percentage syntax - if (s.matches("[0-9]+(?:\\.(?:[0-9]+)?)?%.*")) { + if (s.matches("[0-9]+(\\.[0-9]*)?%.*")) { String[] p = s.split("%"); chance = Double.parseDouble(p[0]); block = getBlock(player, p[1]);