From f6995fee90ce74b0cf9fc6e4515ed1b9e1cf7f53 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 1998 11:16:08 +0000 Subject: [PATCH] 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 --- jode/jode/bytecode/Opcodes.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jode/jode/bytecode/Opcodes.java b/jode/jode/bytecode/Opcodes.java index b24e031..1a629e9 100644 --- a/jode/jode/bytecode/Opcodes.java +++ b/jode/jode/bytecode/Opcodes.java @@ -383,7 +383,7 @@ public abstract class Opcodes { case opc_lookupswitch: { int length = 3-(addr % 4); stream.skip(length); - int def = stream.readInt(); + int def = addr + stream.readInt(); int npairs = stream.readInt(); int[] dests = new int[npairs+2]; for (int i=0; i < npairs; i++) { @@ -425,7 +425,8 @@ public abstract class Opcodes { 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 }; if (opcode >= opc_ifeq && opcode <= opc_if_acmpne) return new int[] { 3, addr + 3, addr + stream.readShort() };