mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 15:41:52 +00:00
AS3 instruction insert fix
This commit is contained in:
@@ -1958,13 +1958,14 @@ public class AVM2Code implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int updateOperandOffset(long insAddr, long targetAddress, int offset) {
|
||||
//System.err.println("instruction.offset=" + instruction.offset);
|
||||
if ((targetAddress > instruction.offset) || (mapOffsetsAfterIns && (targetAddress == instruction.offset))) {
|
||||
if (insAddr >= instruction.offset) {
|
||||
return offset;
|
||||
}
|
||||
if (((targetAddress > instruction.offset) || (mapOffsetsAfterIns && (targetAddress == instruction.offset)))
|
||||
&& (insAddr < instruction.offset)) {
|
||||
return offset + byteCount;
|
||||
}
|
||||
if (((targetAddress < instruction.offset) || (mapOffsetsAfterIns && (targetAddress == instruction.offset)))
|
||||
&& (insAddr > instruction.offset)) {
|
||||
return offset - byteCount;
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
}, body);
|
||||
|
||||
@@ -1432,6 +1432,9 @@ public class Graph {
|
||||
String labelName = "addr" + part.start;
|
||||
List<GraphTargetItem> firstCode = partCodes.get(part);
|
||||
int firstCodePos = partCodePos.get(part);
|
||||
if (firstCodePos > firstCode.size()) {
|
||||
firstCodePos = firstCode.size();
|
||||
}
|
||||
if (firstCode.size() > firstCodePos && (firstCode.get(firstCodePos) instanceof LabelItem)) {
|
||||
labelName = ((LabelItem) firstCode.get(firstCodePos)).labelName;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user