Fix LVT error messages (#17)

This commit is contained in:
Chocohead authored and asie committed 2019-09-16 19:32:40 +02:00
1 parent c4258a3405
commit 2cef4a37bf
1 file changed
+2 -2
@@ -511,8 +511,8 @@ public class CallbackInjector extends Injector {
*/
private String generateBadLVTMessage(final Callback callback) {
int position = callback.target.indexOf(callback.node);
List<String> expected = CallbackInjector.summariseLocals(this.methodNode.desc, callback.target.arguments.length + 1);
List<String> found = CallbackInjector.summariseLocals(callback.getDescriptorWithAllLocals(), callback.frameSize);
List<String> expected = CallbackInjector.summariseLocals(callback.getDescriptorWithAllLocals(), callback.target.arguments.length + 1);
List<String> found = CallbackInjector.summariseLocals(this.methodNode.desc, callback.target.arguments.length + 1);
return String.format("LVT in %s has incompatible changes at opcode %d in callback %s.\nExpected: %s\n Found: %s",
callback.target, position, this, expected, found);
}