mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-20 12:19:52 +00:00
Fix off-by-one error with static accessor injector
This commit is contained in:
1 parent
90994e62fa
commit
376660e8ca
1 file changed
+1
-1
@@ -72,7 +72,7 @@ public class AccessorGeneratorMethodProxy extends AccessorGenerator {
|
||||
if (this.isInstanceMethod) {
|
||||
method.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||
}
|
||||
ASMHelper.loadArgs(this.argTypes, method.instructions, 1);
|
||||
ASMHelper.loadArgs(this.argTypes, method.instructions, this.isInstanceMethod ? 1 : 0);
|
||||
boolean isPrivate = ASMHelper.hasFlag(this.targetMethod, Opcodes.ACC_PRIVATE);
|
||||
int opcode = this.isInstanceMethod ? (isPrivate ? Opcodes.INVOKESPECIAL : Opcodes.INVOKEVIRTUAL) : Opcodes.INVOKESTATIC;
|
||||
method.instructions.add(new MethodInsnNode(opcode, this.info.getClassNode().name, this.targetMethod.name, this.targetMethod.desc, false));
|
||||
|
||||
Reference in new issue
Block a user