mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 04:11:13 +00:00
Introduced LATEST_CONSTANTPOOL_HACK constant for handling AS1/2 files with multiple constantpools (obfuscation)
Other small fixes
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
package com.jpexs.asdec.action;
|
||||
|
||||
import com.jpexs.asdec.Main;
|
||||
import com.jpexs.asdec.SWFOutputStream;
|
||||
import com.jpexs.asdec.action.parser.FlasmLexer;
|
||||
import com.jpexs.asdec.action.parser.ParseException;
|
||||
@@ -359,11 +360,22 @@ public class Action {
|
||||
}
|
||||
|
||||
offset = 0;
|
||||
for (Action a : list) {
|
||||
if (a instanceof ActionConstantPool) {
|
||||
if(Main.LATEST_CONSTANTPOOL_HACK){
|
||||
for (Action a : list) {
|
||||
if (a instanceof ActionConstantPool) {
|
||||
constantPool.clear();
|
||||
constantPool.addAll(((ActionConstantPool) a).constantPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Action a : list) {
|
||||
if(!Main.LATEST_CONSTANTPOOL_HACK)
|
||||
{
|
||||
if (a instanceof ActionConstantPool) {
|
||||
constantPool.clear();
|
||||
constantPool.addAll(((ActionConstantPool) a).constantPool);
|
||||
}
|
||||
}
|
||||
if (a instanceof ActionPush) {
|
||||
((ActionPush) a).constantPool = constantPool;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user