From 64a9ae33cb2f617b7cd76d551ee1b3dc90eabcca Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 15 Feb 2020 15:14:22 +0000 Subject: [PATCH] Fix StackMetadata for FieldInsnNodes --- asm/src/main/java/dev/openrs2/asm/StackMetadata.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asm/src/main/java/dev/openrs2/asm/StackMetadata.kt b/asm/src/main/java/dev/openrs2/asm/StackMetadata.kt index b7290b58..5a898bd1 100644 --- a/asm/src/main/java/dev/openrs2/asm/StackMetadata.kt +++ b/asm/src/main/java/dev/openrs2/asm/StackMetadata.kt @@ -195,9 +195,9 @@ fun AbstractInsnNode.stackMetadata(): StackMetadata = when (this) { pops++ } if (opcode == Opcodes.PUTFIELD || opcode == Opcodes.PUTSTATIC) { - pushes += fieldSize - } else { pops += fieldSize + } else { + pushes += fieldSize } StackMetadata(pops, pushes) }