bug fix; a return may have no instr

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@328 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 33702b2271
commit 4070ffa5a2
  1. 15
      jode/jode/flow/ReturnBlock.java

@ -45,13 +45,14 @@ public class ReturnBlock extends InstructionContainer {
* @return stack the stack afterwards.
*/
public VariableStack mapStackToLocal(VariableStack stack) {
VariableStack newStack;
int params = instr.getOperandCount();
if (params > 0) {
this.stack = stack.peek(params);
newStack = stack.pop(params);
} else
newStack = stack;
VariableStack newStack = stack;
if (instr != null) {
int params = instr.getOperandCount();
if (params > 0) {
this.stack = stack.peek(params);
newStack = stack.pop(params);
}
}
return null;
}

Loading…
Cancel
Save