SpongePowered / Mixin

Mixin is a trait/mixin and bytecode weaving framework for Java using ASM
MIT License
1.41k stars 194 forks source link

ModifyVariableInjector.printLocals passes incorrect amount of variable names #512

Closed sfPlayer1 closed 3 years ago

sfPlayer1 commented 3 years ago

I force-enabled printLocals for debugging purposes through bypassing if (this.discriminator.printLVT()) {, but https://github.com/SpongePowered/Mixin/blob/2046b44ad2fed1255256699f3b0b729bdb674369/src/main/java/org/spongepowered/asm/mixin/injection/modify/ModifyVariableInjector.java#L206 fails with e.g. IllegalArgumentException: Types array length must not exceed names array length! (names=1, types=7)

Mumfrey commented 3 years ago

I think this came from the fact that ModifyVariable didn't support capturing target args originally, f9e19c32f4af07479c6256e6c3a19d398f838979 added support but this was obviously missed.