mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
Merge pull request #660 from GrahlmanMatthew/master
Fixed bug in extractLine function which was returning incorrect line # …
This commit is contained in:
3 files changed
+17
-15
No files matched your search
@@ -212,6 +212,8 @@ func extractLine(patchContent string, leak Leak, lineLookup map[string]bool) int
|
||||
if _, ok := lineLookup[fmt.Sprintf("%s%s%d%s", leak.Offender, leak.Line, lineNumber, leak.File)]; !ok {
|
||||
lineLookup[fmt.Sprintf("%s%s%d%s", leak.Offender, leak.Line, lineNumber, leak.File)] = true
|
||||
return lineNumber
|
||||
} else if ok {
|
||||
return lineNumber
|
||||
}
|
||||
}
|
||||
currLine++
|
||||
|
||||
Reference in new issue
Block a user