mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 09:14:49 +00:00
Merge origin/master
This commit is contained in:
@@ -150,7 +150,15 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
|
||||
}
|
||||
newIstructionCount += 2 * result.variables.size();
|
||||
|
||||
if (newIstructionCount * 2 < result.instructionsProcessed) {
|
||||
boolean allValueValid = true;
|
||||
for (Object value : result.variables.values()) {
|
||||
if (!ActionPush.isValidValue(value)) {
|
||||
allValueValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (allValueValid && newIstructionCount * 2 < result.instructionsProcessed) {
|
||||
Action target = actions.get(result.idx);
|
||||
Action prevAction = actions.get(i);
|
||||
|
||||
|
||||
@@ -186,6 +186,23 @@ public class ActionPush extends Action {
|
||||
return surroundWithAction(baos.toByteArray(), version);
|
||||
}
|
||||
|
||||
public static boolean isValidValue(Object value) {
|
||||
if (value instanceof String) {
|
||||
for (char ch : ((String) value).toCharArray()) {
|
||||
if (ch == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value instanceof Long) {
|
||||
long l = (Long) value;
|
||||
if (l < 0x8000000 || l > 0x7ffffff) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public ActionPush(Object value) {
|
||||
super(0x96, 0);
|
||||
this.values = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user