Changed version code, to accept version 46.0 (jdk 1.2)

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1260 379699f6-c40d-0410-875b-85095c16579e
master
hoenicke 24 years ago
parent 0b2f10fddf
commit e154dfdc1b
  1. 9
      jode/jode/bytecode/ClassInfo.java

@ -711,10 +711,11 @@ public final class ClassInfo extends BinaryInfo implements Comparable {
/* 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();

Loading…
Cancel
Save