mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
Fixed lineEnd indexing if the match is the whole line (#1223)
This commit is contained in:
1 parent
30c6117aaa
commit
8976539177
1 file changed
+1
-1
+1
-1
@@ -130,7 +130,7 @@ func printFinding(f report.Finding, noColor bool) {
|
||||
|
||||
lineEndIdx := matchInLineIDX + len(f.Match)
|
||||
if len(f.Line)-1 <= lineEndIdx {
|
||||
lineEndIdx = len(f.Line) - 1
|
||||
lineEndIdx = len(f.Line)
|
||||
}
|
||||
|
||||
lineEnd := f.Line[lineEndIdx:]
|
||||
|
||||
Reference in new issue
Block a user