mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-20 04:09:50 +00:00
Fixes and improvements for local capture, avoid cryptic error on bad LVT
This commit is contained in:
1 parent
4e1c5b272b
commit
10040e9f3d
4 files changed
+41
-7
No files matched your search
@@ -190,6 +190,13 @@ public class Locals {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Null out any "unknown" locals
|
||||
for (int l = 0; l < frame.length; l++) {
|
||||
if (frame[l] != null && frame[l].desc == null) {
|
||||
frame[l] = null;
|
||||
}
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
@@ -317,8 +324,12 @@ public class Locals {
|
||||
}
|
||||
|
||||
if (label == null) {
|
||||
label = new LabelNode();
|
||||
labels[i] = label;
|
||||
AbstractInsnNode existingLabel = method.instructions.get(i);
|
||||
if (existingLabel instanceof LabelNode) {
|
||||
label = (LabelNode) existingLabel;
|
||||
} else {
|
||||
labels[i] = label = new LabelNode();
|
||||
}
|
||||
}
|
||||
|
||||
if (local == null && locals[j] != null) {
|
||||
|
||||
Reference in new issue
Block a user