Fix for the original fix for #480, which actually fixes #480

This commit is contained in:
Mumfrey committed 2021-04-26 13:04:21 +01:00
1 parent 5f51f16bb5
commit 6e807085d8
1 file changed
+2 -1
@@ -272,7 +272,8 @@ public final class Locals {
boolean isLoad = insn.getOpcode() >= Opcodes.ILOAD && insn.getOpcode() <= Opcodes.SALOAD;
if (isLoad) {
frame[varNode.var] = Locals.getLocalVariableAt(classNode, method, insn, varNode.var);
knownFrameSize = Math.max(knownFrameSize, varNode.var + Type.getType(frame[varNode.var].desc).getSize());
int varSize = frame[varNode.var].desc != null ? Type.getType(frame[varNode.var].desc).getSize() : 1;
knownFrameSize = Math.max(knownFrameSize, varNode.var + varSize);
} else {
// Update the LVT for the opcode AFTER this one, since we always want to know
// the frame state BEFORE the *current* instruction to match the contract of