Accept class version 46.0 (jdk1.2)

git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1261 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 25 years ago
parent 356a8c6a61
commit 075db18fcf
  1. 9
      jode/jode/bytecode/ClassInfo.java.in

@ -272,10 +272,11 @@ public class ClassInfo extends BinaryInfo {
/* header */ /* header */
if (input.readInt() != 0xcafebabe) if (input.readInt() != 0xcafebabe)
throw new ClassFormatException("Wrong magic"); throw new ClassFormatException("Wrong magic");
if (input.readUnsignedShort() > 3) int version = input.readUnsignedShort();
throw new ClassFormatException("Wrong minor"); version |= input.readUnsignedShort() << 16;
if (input.readUnsignedShort() != 45) if (version < (45 << 16 | 0)
throw new ClassFormatException("Wrong major"); || version > (46 << 16 | 0))
throw new ClassFormatException("Wrong class version");
/* constant pool */ /* constant pool */
ConstantPool cpool = new ConstantPool(); ConstantPool cpool = new ConstantPool();

Loading…
Cancel
Save