fix: incorrect pattern offset

This commit is contained in:
Lucaskyy
2022-04-16 21:38:06 +02:00
parent ae06d826e8
commit 03700ffa51

View File

@@ -99,6 +99,7 @@ internal class SignatureResolver(
currentThreshold-- == 0 currentThreshold-- == 0
) break ) break
if (++patternIndex < size) continue if (++patternIndex < size) continue
patternIndex-- // fix pattern offset
val result = PatternScanResult(instructionIndex, instructionIndex + patternIndex) val result = PatternScanResult(instructionIndex, instructionIndex + patternIndex)
if (method is PatternScanMethod.Fuzzy) { if (method is PatternScanMethod.Fuzzy) {