From d9e7c2b8031abbc02ca879954e21c61774f35f5d Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 25 Jul 1999 08:08:52 +0000 Subject: [PATCH] fixed some bugs git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1129 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/jvm/CodeVerifier.java.in | 12 ++++++------ jode/jode/jvm/Interpreter.java.in | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/jode/jode/jvm/CodeVerifier.java.in b/jode/jode/jvm/CodeVerifier.java.in index 562860b..556902f 100644 --- a/jode/jode/jvm/CodeVerifier.java.in +++ b/jode/jode/jvm/CodeVerifier.java.in @@ -736,29 +736,29 @@ public class CodeVerifier implements Opcodes { case opc_lcmp: if (result.pop() != tSecondPart) throw new VerifyException(instr.getDescription()); - if (result.pop() != tLong) + if (!result.pop().isOfType("J")) throw new VerifyException(instr.getDescription()); if (result.pop() != tSecondPart) throw new VerifyException(instr.getDescription()); - if (result.pop() != tLong) + if (!result.pop().isOfType("J")) throw new VerifyException(instr.getDescription()); result.push(tInt); break; case opc_dcmpl: case opc_dcmpg: if (result.pop() != tSecondPart) throw new VerifyException(instr.getDescription()); - if (result.pop() != tDouble) + if (!result.pop().isOfType("D")) throw new VerifyException(instr.getDescription()); if (result.pop() != tSecondPart) throw new VerifyException(instr.getDescription()); - if (result.pop() != tDouble) + if (!result.pop().isOfType("D")) throw new VerifyException(instr.getDescription()); result.push(tInt); break; case opc_fcmpl: case opc_fcmpg: - if (result.pop() != tFloat) + if (!result.pop().isOfType("F")) throw new VerifyException(instr.getDescription()); - if (result.pop() != tFloat) + if (!result.pop().isOfType("F")) throw new VerifyException(instr.getDescription()); result.push(tInt); break; diff --git a/jode/jode/jvm/Interpreter.java.in b/jode/jode/jvm/Interpreter.java.in index a96234e..afdecde 100644 --- a/jode/jode/jvm/Interpreter.java.in +++ b/jode/jode/jvm/Interpreter.java.in @@ -685,6 +685,9 @@ public class Interpreter implements Opcodes { } case opc_arraylength: { Object array = stack[--stacktop].objectValue(); + if (array == null) + throw new InvocationTargetException + (new NullPointerException()); stack[stacktop++].setInt(Array.getLength(array)); break; }