Skip to content

Commit b2432c7

Browse files
committed
fix faulty parameter detection
1 parent b8f9dc8 commit b2432c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/enigmaPlugin/kotlin/org/parchmentmc/enigma/EnigmaNameProposalService.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ class EnigmaNameProposalService() : JarIndexerService, NameProposalService {
9393
}
9494

9595
val paramIndex = fromLvtToParamIndex(obfEntry.index, parent, offsetLvtIndex)
96+
if (paramIndex == -1) {
97+
return Optional.empty() // happens for faulty param detection (like Player#actuallyHurt)
98+
}
99+
96100
val desc = parent.desc.argumentDescs[paramIndex]
97101
if (desc.isPrimitive) {
98102
return Optional.empty()

0 commit comments

Comments
 (0)