Introduced LATEST_CONSTANTPOOL_HACK constant for handling AS1/2 files with multiple constantpools (obfuscation)

Other small fixes
This commit is contained in:
Jindra Pet��k
2012-10-20 16:30:46 +02:00
parent 67c124e28c
commit c44d0c6bbf
4 changed files with 26 additions and 5 deletions
+14 -2
View File
@@ -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;
}