diff --git a/enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java b/enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java index aaee391d..36e5c6dd 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java +++ b/enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java @@ -97,7 +97,7 @@ private void ensureDecompiled() { // Tokens codeInfo.getCodeMetadata().searchDown(0, (pos, ann) -> { - processAnnotatedElement(pos, ann, cls.getCodeInfo()); + processAnnotatedElement(pos, ann, codeInfo); return null; }); } @@ -139,8 +139,8 @@ private void processAnnotatedElement(int pos, ICodeAnnotation ann, ICodeInfo cod if (!var.getMth().collectArgsWithoutLoading().contains(var)) return; Token token = new Token(pos, pos + var.getName().length(), var.getName()); - if (pos == var.getDefPosition()) { - index.addDeclaration(token, paramEntryOf(var, codeInfo)); + if (pos == var.getDefPosition()) { + index.addDeclaration(token, paramEntryOf(var, codeInfo)); } else { index.addReference(token, paramEntryOf(var, codeInfo), methodEntryOf(var.getMth())); } @@ -161,7 +161,7 @@ private MethodEntry methodEntryOf(MethodNode mth) { return jadxHelper.methodEntryOf(mth); } - private LocalVariableEntry paramEntryOf(VarNode param, ICodeInfo codeInfo) { + private LocalVariableEntry paramEntryOf(VarNode param, ICodeInfo codeInfo) { return jadxHelper.paramEntryOf(param, codeInfo); } }