diff --git a/pkg/analyze/text_analyze.go b/pkg/analyze/text_analyze.go index 7e5aa7032..fbd17c7a5 100644 --- a/pkg/analyze/text_analyze.go +++ b/pkg/analyze/text_analyze.go @@ -90,7 +90,7 @@ func analyzeRegexGroups(pattern string, collected []byte, outcomes []*troublesho foundMatches := map[string]string{} for i, name := range re.SubexpNames() { - if i != 0 && name != "" { + if i != 0 && name != "" && len(match) > i { foundMatches[name] = match[i] } }