docs: fix improper docs for fuzzy resolver Warning

This commit is contained in:
Lucaskyy 2022-04-15 10:38:24 +02:00 committed by oSumAtrIX
parent c8b68e36e0
commit 7f18bbf66e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 5 additions and 5 deletions

View File

@ -92,8 +92,8 @@ interface PatternScanMethod {
/** /**
* Represents a resolver warning. * Represents a resolver warning.
* @param correctOpcode The opcode the signature expected it to be. * @param correctOpcode The opcode the instruction list has.
* @param wrongOpcode The opcode the signature currently has. * @param wrongOpcode The opcode the pattern list of the signature currently has.
* @param instructionIndex The index of the opcode relative to the instruction list. * @param instructionIndex The index of the opcode relative to the instruction list.
* @param patternIndex The index of the opcode relative to the pattern list from the signature. * @param patternIndex The index of the opcode relative to the pattern list from the signature.
*/ */

View File

@ -126,8 +126,8 @@ internal class SignatureResolver(
scanResult: PatternScanResult, scanResult: PatternScanResult,
) = buildList { ) = buildList {
val pattern = signature.opcodes!! val pattern = signature.opcodes!!
for ((patternIndex, originalIndex) in (scanResult.startIndex until scanResult.endIndex).withIndex()) { for ((patternIndex, instructionIndex) in (scanResult.startIndex until scanResult.endIndex).withIndex()) {
val correctOpcode = instructions.elementAt(originalIndex).opcode val correctOpcode = instructions.elementAt(instructionIndex).opcode
val patternOpcode = pattern.elementAt(patternIndex) val patternOpcode = pattern.elementAt(patternIndex)
if ( if (
patternOpcode != null && // unknown opcode patternOpcode != null && // unknown opcode
@ -136,7 +136,7 @@ internal class SignatureResolver(
this.add( this.add(
PatternScanMethod.Fuzzy.Warning( PatternScanMethod.Fuzzy.Warning(
correctOpcode, patternOpcode, correctOpcode, patternOpcode,
originalIndex, patternIndex, instructionIndex, patternIndex,
) )
) )
} }