Issue #51 AS1/2 displaying java class name instead of expression

Better constantpool detection
This commit is contained in:
Jindra Petk
2013-03-31 22:06:35 +02:00
parent 3472cc79d2
commit 5a53822dd4
16 changed files with 42 additions and 38 deletions

View File

@@ -753,23 +753,6 @@ public class SWFInputStream extends InputStream {
if (ip < startIp) {
retv = true;
}
if (debugMode) {
//if(a instanceof ActionIf){
String atos = a.getASMSource(new ArrayList<Long>(), cpool.constants, sis.version, false);
if (a instanceof ActionContainer) {
atos = a.toString();
}
System.err.println("readActionListAtPos ip: " + (ip - startIp) + " (0x" + Helper.formatAddress(ip - startIp) + ") " + " action(len " + a.actionLength + "): " + atos + (a.isIgnored() ? " (ignored)" : "") + " stack:" + Helper.stackToString(stack, Helper.toList(cpool)) + " " + Helper.byteArrToString(a.getBytes(SWF.DEFAULT_VERSION)));
//}
String add = "";
if (a instanceof ActionIf) {
add = " change: " + ((ActionIf) a).getJumpOffset();
}
if (a instanceof ActionJump) {
add = " change: " + ((ActionJump) a).getJumpOffset();
}
System.err.println(add);
}
/*if(a instanceof ActionConstantPool){
@@ -793,6 +776,24 @@ public class SWFInputStream extends InputStream {
cpool.count++;
}
}
if (debugMode) {
//if(a instanceof ActionIf){
String atos = a.getASMSource(new ArrayList<Long>(), cpool.constants, sis.version, false);
if (a instanceof ActionContainer) {
atos = a.toString();
}
System.err.println("readActionListAtPos ip: " + (ip - startIp) + " (0x" + Helper.formatAddress(ip - startIp) + ") " + " action(len " + a.actionLength + "): " + atos + (a.isIgnored() ? " (ignored)" : "") + " stack:" + Helper.stackToString(stack, Helper.toList(cpool)) + " " + Helper.byteArrToString(a.getBytes(SWF.DEFAULT_VERSION)));
//}
String add = "";
if (a instanceof ActionIf) {
add = " change: " + ((ActionIf) a).getJumpOffset();
}
if (a instanceof ActionJump) {
add = " change: " + ((ActionJump) a).getJumpOffset();
}
System.err.println(add);
}
long newFilePos = rri.getPos();
long actionLen = newFilePos - filePos;