diff --git a/jode/jode/bytecode/ClassInfo.java.in b/jode/jode/bytecode/ClassInfo.java.in index abb5a01..83f6533 100644 --- a/jode/jode/bytecode/ClassInfo.java.in +++ b/jode/jode/bytecode/ClassInfo.java.in @@ -272,10 +272,11 @@ public class ClassInfo extends BinaryInfo { /* header */ if (input.readInt() != 0xcafebabe) throw new ClassFormatException("Wrong magic"); - if (input.readUnsignedShort() > 3) - throw new ClassFormatException("Wrong minor"); - if (input.readUnsignedShort() != 45) - throw new ClassFormatException("Wrong major"); + int version = input.readUnsignedShort(); + version |= input.readUnsignedShort() << 16; + if (version < (45 << 16 | 0) + || version > (46 << 16 | 0)) + throw new ClassFormatException("Wrong class version"); /* constant pool */ ConstantPool cpool = new ConstantPool();