Commit 6b76a3c7 authored by Skylot's avatar Skylot

fix: protect method from second load

parent 9fbf9ef6
...@@ -88,6 +88,7 @@ public class MethodNode extends LineAttrNode implements ILoadable, ICodeNode { ...@@ -88,6 +88,7 @@ public class MethodNode extends LineAttrNode implements ILoadable, ICodeNode {
@Override @Override
public void unload() { public void unload() {
regsCount = -1;
if (noCode) { if (noCode) {
return; return;
} }
...@@ -106,6 +107,10 @@ public class MethodNode extends LineAttrNode implements ILoadable, ICodeNode { ...@@ -106,6 +107,10 @@ public class MethodNode extends LineAttrNode implements ILoadable, ICodeNode {
@Override @Override
public void load() throws DecodeException { public void load() throws DecodeException {
if (regsCount != -1) {
// method already loaded
return;
}
try { try {
if (noCode) { if (noCode) {
regsCount = 0; regsCount = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment