bug fix (default in lookup switch, throw in getSizeAndSuccs)

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@124 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 863b4a9ccf
commit f6995fee90
  1. 5
      jode/jode/bytecode/Opcodes.java

@ -383,7 +383,7 @@ public abstract class Opcodes {
case opc_lookupswitch: { case opc_lookupswitch: {
int length = 3-(addr % 4); int length = 3-(addr % 4);
stream.skip(length); stream.skip(length);
int def = stream.readInt(); int def = addr + stream.readInt();
int npairs = stream.readInt(); int npairs = stream.readInt();
int[] dests = new int[npairs+2]; int[] dests = new int[npairs+2];
for (int i=0; i < npairs; i++) { for (int i=0; i < npairs; i++) {
@ -425,7 +425,8 @@ public abstract class Opcodes {
return new int[] { 2, addr+2 }; return new int[] { 2, addr+2 };
} }
if (opcode >= opc_ireturn && opcode <= opc_return) if (opcode == opc_athrow
&& opcode >= opc_ireturn && opcode <= opc_return)
return new int[] { 1 }; return new int[] { 1 };
if (opcode >= opc_ifeq && opcode <= opc_if_acmpne) if (opcode >= opc_ifeq && opcode <= opc_if_acmpne)
return new int[] { 3, addr + 3, addr + stream.readShort() }; return new int[] { 3, addr + 3, addr + stream.readShort() };

Loading…
Cancel
Save