mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 05:40:45 +00:00
AS1/2 and AS3 now share common decompiling method
This commit is contained in:
@@ -19,8 +19,10 @@ package com.jpexs.decompiler.flash.action.swf4;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionGraphSource;
|
||||
import com.jpexs.decompiler.flash.action.parser.FlasmLexer;
|
||||
import com.jpexs.decompiler.flash.action.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.graph.GraphSource;
|
||||
import com.jpexs.decompiler.flash.helpers.Helper;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -81,4 +83,17 @@ public class ActionIf extends Action {
|
||||
public String toString() {
|
||||
return "ActionIf";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBranch() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getBranches(GraphSource code) {
|
||||
List<Integer> ret = super.getBranches(code);
|
||||
ret.add(code.adr2pos(getAddress() + getBytes(((ActionGraphSource) code).version).length + offset));
|
||||
ret.add(code.adr2pos(getAddress() + getBytes(((ActionGraphSource) code).version).length));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user