Handle gaps in local variable table when failing over to surrogates

This commit is contained in:
Mumfrey committed 2015-11-21 02:20:16 +00:00
1 parent e337823f69
commit f32d67a23c
3 files changed
+6 -4

No files matched your search

@@ -72,9 +72,10 @@ public class Locals {
*/
public static void loadLocals(Type[] locals, InsnList insns, int pos, int limit) {
limit += pos;
for (; pos < locals.length && pos < limit; pos++) {
for (; pos < locals.length && limit > 0; pos++) {
if (locals[pos] != null) {
insns.add(new VarInsnNode(locals[pos].getOpcode(Opcodes.ILOAD), pos));
limit--;
}
}
}