mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 09:40:43 +00:00
fixed fileattributes tag reading
This commit is contained in:
@@ -328,6 +328,10 @@ public class SWF {
|
||||
tags = sis.readTagList(0, paralelRead, true);
|
||||
assignExportNamesToSymbols();
|
||||
assignClassesToSymbols();
|
||||
findFileAttributes();
|
||||
}
|
||||
|
||||
private void findFileAttributes(){
|
||||
for (Tag t : tags) {
|
||||
if (t instanceof FileAttributesTag) {
|
||||
fileAttributes = (FileAttributesTag) t;
|
||||
@@ -335,7 +339,7 @@ public class SWF {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void assignExportNamesToSymbols() {
|
||||
HashMap<Integer, String> exportNames = new HashMap<>();
|
||||
for (Tag t : tags) {
|
||||
@@ -1729,6 +1733,7 @@ public class SWF {
|
||||
HashMap<String, Integer> typeCounts = new HashMap<>();
|
||||
|
||||
public int deobfuscateIdentifiers(RenameType renameType) {
|
||||
findFileAttributes();
|
||||
if (fileAttributes == null) {
|
||||
int cnt = 0;
|
||||
cnt += deobfuscateAS2Identifiers(renameType);
|
||||
|
||||
@@ -1228,6 +1228,7 @@ public class SWFInputStream extends InputStream {
|
||||
if (fileAttributes.actionScript3) {
|
||||
isAS3 = true;
|
||||
}
|
||||
doParse = true;
|
||||
break;
|
||||
case DoActionTag.ID:
|
||||
case DoInitActionTag.ID:
|
||||
|
||||
@@ -51,7 +51,7 @@ public class SwitchItem extends LoopItem implements Block {
|
||||
ret += hilight("switch(") + switchedObject.toString(localData) + hilight(")") + "\r\n{\r\n";
|
||||
for (int i = 0; i < caseCommands.size(); i++) {
|
||||
for (int k = 0; k < valuesMapping.size(); k++) {
|
||||
if (valuesMapping.get(k) == i) {
|
||||
if (valuesMapping.get(k) == i) {
|
||||
ret += "case " + caseValues.get(k).toString(localData) + ":\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user