Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Minor improvement to MathMan#isInteger
Dieser Commit ist enthalten in:
Ursprung
7d3a9ff36d
Commit
8928556c1d
@ -352,8 +352,18 @@ public class MathMan {
|
|||||||
if (str.charAt(0) == '-') {
|
if (str.charAt(0) == '-') {
|
||||||
if (length == 1) {
|
if (length == 1) {
|
||||||
return false;
|
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;
|
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++) {
|
for (; i < length; i++) {
|
||||||
char c = str.charAt(i);
|
char c = str.charAt(i);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren