From 3e4f1d5cd872a96ec081242dfea9cce65bd89972 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 11 Aug 2021 20:38:52 +0100 Subject: [PATCH] Better Mathman#isInteger --- .../main/java/com/fastasyncworldedit/core/util/MathMan.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MathMan.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MathMan.java index afc9916ab..d7c7d1fbc 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MathMan.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MathMan.java @@ -355,14 +355,14 @@ public class MathMan { //VERY basic check for >< int min/max value without spending time trying to parse the int } else if (length > 11) { return false; - } else if (length == 11 && str.charAt(0) > '2' && str.charAt(0) > '1') { + } else if (length == 11 && (str.charAt(0) > '2' || str.charAt(0) < '0') && (str.charAt(1) > '1' || str.charAt(1) < '0')) { return false; } i = 1; //VERY basic check for >< int min/max value without spending time trying to parse the int } else if (length > 10) { return false; - } else if (length == 10 && str.charAt(0) > '2' && str.charAt(0) > '1') { + } else if (length == 10 && (str.charAt(0) > '2' || str.charAt(0) < '0') && (str.charAt(1) > '1' || str.charAt(1) < '0')) { return false; } for (; i < length; i++) {