diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java index dd1639e1f..3e147524e 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java @@ -123,7 +123,12 @@ protected void injectAtInvoke(Target target, InjectionNode node) { } target.insns.insertBefore(methodNode, insns); - target.extendStack().set(2 - (extraLocals.get() - 1)).apply(); + Extension extraStack = target.extendStack(); + if (!isStatic) { + extraStack.add(); + } + extraStack.add(methodArgs); + extraStack.apply(); extraLocals.apply(); }