Procházet zdrojové kódy

Fixed lineEnd indexing if the match is the whole line (#1223)

Gian Miguel Del Mundo před 2 roky
rodič
revize
8976539177
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      detect/utils.go

+ 1 - 1
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:]