From 4e8634565f6768b2751d7d9d4ed658ae1100f689 Mon Sep 17 00:00:00 2001 From: Devan-Kerman Date: Sun, 1 Aug 2021 21:46:09 -0500 Subject: [PATCH] allow INVOKE_ASSIGN to work with casts --- .../spongepowered/asm/mixin/injection/points/AfterInvoke.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/points/AfterInvoke.java b/src/main/java/org/spongepowered/asm/mixin/injection/points/AfterInvoke.java index 2bf054850..9d730f0f7 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/points/AfterInvoke.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/points/AfterInvoke.java @@ -82,6 +82,10 @@ protected boolean addInsn(InsnList insns, Collection nodes, Ab } insn = InjectionPoint.nextNode(insns, insn); + if(insn instanceof TypeInsnNode && insn.getOpcode() == Opcodes.CHECKCAST) { + insn = InjectionPoint.nextNode(insns, insn); + } + if (insn instanceof VarInsnNode && insn.getOpcode() >= Opcodes.ISTORE) { insn = InjectionPoint.nextNode(insns, insn); }