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. * @return stack the stack afterwards.
*/ */
public VariableStack mapStackToLocal(VariableStack stack) { public VariableStack mapStackToLocal(VariableStack stack) {
VariableStack newStack; VariableStack newStack = stack;
int params = instr.getOperandCount(); if (instr != null) {
if (params > 0) { int params = instr.getOperandCount();
this.stack = stack.peek(params); if (params > 0) {
newStack = stack.pop(params); this.stack = stack.peek(params);
} else newStack = stack.pop(params);
newStack = stack; }
}
return null; return null;
} }

Loading…
Cancel
Save