mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 17:20:46 +00:00
#1070 Incorrect decompilation of switch statement fixed
This commit is contained in:
@@ -1297,6 +1297,16 @@ public class AVM2Code implements Cloneable {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public AVM2Instruction adr2ins(long address) throws ConvertException {
|
||||
int pos = adr2pos(address, false);
|
||||
if (pos == code.size()) {
|
||||
// end
|
||||
return null;
|
||||
}
|
||||
|
||||
return code.get(pos);
|
||||
}
|
||||
|
||||
public int adr2pos(long address) throws ConvertException {
|
||||
return adr2pos(address, false);
|
||||
}
|
||||
|
||||
-1
@@ -146,7 +146,6 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
|
||||
|
||||
originalBody.exceptions = body.exceptions;
|
||||
originalBody.setCode(body.getCode());
|
||||
|
||||
}
|
||||
|
||||
private int getFirstRegisterSetter(Reference<AVM2Instruction> assignment, int classIndex, boolean isStatic, int scriptIndex, ABC abc, MethodBody body, Set<Integer> ignoredRegisters, Set<Integer> ignoredGets) throws InterruptedException {
|
||||
|
||||
+4
@@ -383,6 +383,10 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
return offset + 4 /*getBytesLength()*/ + operands[0];
|
||||
}
|
||||
|
||||
public void setTargetOffset(int offset) {
|
||||
operands[0] = offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getBranches(GraphSource code) {
|
||||
List<Integer> ret = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user