From 42e21393eae3fea12a3bc7ca2135e17d64861ed5 Mon Sep 17 00:00:00 2001 From: Panda <44699887+TerriblePanda@users.noreply.github.com> Date: Sat, 31 Aug 2019 14:39:19 +0800 Subject: [PATCH] asm fix --- .../java/org/objectweb/asm/ClassReader.java | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/objectweb/asm/ClassReader.java b/src/main/java/org/objectweb/asm/ClassReader.java index 5b6b8a6..8ebc7a2 100644 --- a/src/main/java/org/objectweb/asm/ClassReader.java +++ b/src/main/java/org/objectweb/asm/ClassReader.java @@ -1308,24 +1308,10 @@ private void readCode( // Read the max_stack, max_locals and code_length fields. final byte[] classBuffer = classFileBuffer; final char[] charBuffer = context.charBuffer; - final int majorVersion = readUnsignedShort(6); - final int minorVersion = readUnsignedShort(4); - - final int maxStack; - final int maxLocals; - final int codeLength; - - if (majorVersion == 45 && minorVersion <= 2) { - maxStack = readByte(currentOffset); - maxLocals = readByte(currentOffset + 1); - codeLength = readUnsignedShort(currentOffset + 2); - currentOffset += 4; - } else { - maxStack = readUnsignedShort(currentOffset); - maxLocals = readUnsignedShort(currentOffset + 2); - codeLength = readInt(currentOffset + 4); - currentOffset += 8; - } + final int maxStack = readUnsignedShort(currentOffset); + final int maxLocals = readUnsignedShort(currentOffset + 2); + final int codeLength = readInt(currentOffset + 4); + currentOffset += 8; // Read the bytecode 'code' array to create a label for each referenced instruction. final int bytecodeStartOffset = currentOffset;