fix: incorrect pattern offset

This commit is contained in:
Lucaskyy 2022-04-16 21:38:06 +02:00
parent ae06d826e8
commit 03700ffa51
No known key found for this signature in database
GPG key ID: 1530BFF96D1EEB89

View file

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