fix arg parsing + some line ending shit
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
group = 'net.runelite'
|
||||
// Just update this manually like the pro you are
|
||||
version = '07082019'
|
||||
version = '21062020'
|
||||
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
apply plugin: 'java'
|
||||
|
||||
@@ -35,16 +35,10 @@ public class ConsoleDecompiler implements IBytecodeProvider, IResultSaver {
|
||||
for (int i = 0; i < args.length - 1; ++i) { // last parameter - destination
|
||||
String arg = args[i];
|
||||
|
||||
if (isOption && arg.length() > 5 && arg.charAt(0) == '-' && arg.charAt(4) == '=') {
|
||||
String value = arg.substring(5);
|
||||
if ("true".equalsIgnoreCase(value)) {
|
||||
value = "1";
|
||||
}
|
||||
else if ("false".equalsIgnoreCase(value)) {
|
||||
value = "0";
|
||||
}
|
||||
|
||||
mapOptions.put(arg.substring(1, 4), value);
|
||||
if (isOption && arg.length() > 5 && arg.charAt(0) == '-' && arg.charAt(arg.length() - 2) == '=') {
|
||||
String value = arg.substring(arg.indexOf("=") + 1);
|
||||
String target = arg.substring(1, arg.indexOf("="));
|
||||
mapOptions.put(target, value);
|
||||
}
|
||||
else {
|
||||
isOption = false;
|
||||
|
||||
@@ -132,7 +132,7 @@ public class TextBuffer {
|
||||
sb.append(myStringBuilder.substring(lineStart, lineEnd));
|
||||
Set<Integer> integers = myLineMapping.get(count);
|
||||
if (integers != null) {
|
||||
sb.append("//");
|
||||
sb.append(" // L:");
|
||||
for (Integer integer : integers) {
|
||||
sb.append(' ').append(integer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user