getObject on String should really just return the string
This commit is contained in:
@@ -36,6 +36,11 @@ public abstract class Instruction
|
||||
{
|
||||
return length;
|
||||
}
|
||||
|
||||
public String getDesc(Frame frame)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void addJump(int offset)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public class AAStore extends Instruction
|
||||
{
|
||||
Stack stack = frame.getStack();
|
||||
|
||||
ObjectInstance value = (ObjectInstance) stack.pop();
|
||||
ObjectInstance value = (ObjectInstance) stack.pop(); // Strings are objects too, so this cast fails
|
||||
int index = (int) stack.pop();
|
||||
ArrayInstance array = (ArrayInstance) stack.pop();
|
||||
|
||||
|
||||
@@ -40,6 +40,13 @@ public class InvokeStatic extends Instruction
|
||||
for (int i = count - 1; i >= 0; --i)
|
||||
args[i] = e.getStack().pop();
|
||||
|
||||
if (otherClass == null)
|
||||
{
|
||||
System.out.println("invokestatic for nonexistant class " + clazz.getName());
|
||||
e.getStack().push(this, null);
|
||||
return;
|
||||
}
|
||||
|
||||
info.sigterm.deob.Method meth = otherClass.findMethod(method.getNameAndType());
|
||||
e.getPath().invoke(meth, args);
|
||||
}
|
||||
|
||||
@@ -30,4 +30,14 @@ public class LDC_W extends Instruction
|
||||
PoolEntry entry = thisClass.getPool().getEntry(index);
|
||||
frame.getStack().push(this, entry.getObject());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getDesc(Frame frame)
|
||||
{
|
||||
ClassFile thisClass = this.getInstructions().getCode().getAttributes().getClassFile();
|
||||
PoolEntry entry = thisClass.getPool().getEntry(index);
|
||||
|
||||
return "ldc_w " + entry.getObject();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user