Bug fix: don't treat negative numbers on the wpscript command line as options

master
Captain Chaos 2022-05-15 18:54:25 +02:00
parent 81ccde15db
commit 3b91a9c3f9
2 changed files with 10 additions and 1 deletions

View File

@ -154,6 +154,14 @@ public class ScriptingTool {
paramMap.put(arg.substring(2), "true");
}
} else if (arg.startsWith("-") && (arg.length() > 1) && (arg.charAt(1) != '-')) {
try {
// It might just be a negative number
Integer.parseInt(arg);
argList.add(arg);
continue;
} catch (NumberFormatException e) {
// Apparently not. Continue
}
for (int i = 1; i < arg.length(); i++) {
paramMap.put(arg.substring(i, i + 1), "true");
}

View File

@ -1,7 +1,8 @@
-- Version 2.10.3, released ...
-- Version 2.10.3, released 15-5-2022
* A new Barrier border type has been added, in addition to the previously added Barrier wall type
* When the Barrier wall type is used the word type is no longer forced to Superflat and no endless Void is generated beyond the wall. This means the Minecraft-generated land beyond it will be visible; to prevent that the new Barrier border can be used instead, which can be made to be much wider (or endless)
* Bug fix: don't treat negative numbers on the wpscript command line as options
-- Version 2.10.2, released 14-5-2022