diff --git a/detect/utils.go b/detect/utils.go index 7b2c0d21..16ca6f41 100644 --- a/detect/utils.go +++ b/detect/utils.go @@ -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:]