3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-07-22 18:18:03 +02:00

Minor improvement to MathMan#isInteger

Dieser Commit ist enthalten in:
dordsor21 2021-08-11 12:32:46 +01:00
Ursprung 7d3a9ff36d
Commit 8928556c1d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -352,8 +352,18 @@ public class MathMan {
if (str.charAt(0) == '-') {
if (length == 1) {
return false;
//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') {
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') {
return false;
}
for (; i < length; i++) {
char c = str.charAt(i);