mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-25 09:54:24 +00:00
Fix: Properly extend the stack in CallbackInjector. (#131)
The old logic misses the receiver and does not correctly handle double-size types.
This commit is contained in:
1 parent
8c8ece2737
commit
dadc14717c
1 file changed
+1
-4
@@ -212,10 +212,7 @@ public class CallbackInjector extends Injector {
|
||||
this.invoke = target.extendStack();
|
||||
this.ctor = target.extendStack();
|
||||
|
||||
this.invoke.add(target.arguments.length);
|
||||
if (this.canCaptureLocals) {
|
||||
this.invoke.add(this.localTypes.length - this.frameSize);
|
||||
}
|
||||
this.invoke.add().add(handlerArgs);
|
||||
|
||||
//If the handler doesn't captureArgs, the CallbackInfo(Returnable) will be the first LVT slot, otherwise it will be at the target's frameSize
|
||||
int callbackInfoSlot = handlerArgs.length == 1 ? Bytecode.isStatic(handler) ? 0 : 1 : frameSize;
|
||||
|
||||
Reference in new issue
Block a user