mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-25 16:54:28 +00:00
Raise exception when ModifyVariable handler args incorrect, closes #232
This commit is contained in:
1 parent
569a0bcded
commit
9a089172be
1 file changed
+7
-1
+7
-1
@@ -148,7 +148,13 @@ public class ModifyVariableInjector extends Injector {
|
||||
if (this.discriminator.printLVT()) {
|
||||
this.printLocals(context);
|
||||
}
|
||||
|
||||
|
||||
String handlerDesc = Bytecode.getDescriptor(new Type[] { this.returnType }, this.returnType);
|
||||
if (!handlerDesc.equals(this.methodNode.desc)) {
|
||||
throw new InvalidInjectionException(this.info, "Variable modifier " + this + " has an invalid signature, expected " + handlerDesc
|
||||
+ " but found " + this.methodNode.desc);
|
||||
}
|
||||
|
||||
try {
|
||||
int local = this.discriminator.findLocal(context);
|
||||
if (local > -1) {
|
||||
|
||||
Reference in new issue
Block a user