From 0df8e0fac10aaeee4ea3c89a91e58816bd0db412 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Fri, 29 Sep 2023 14:55:28 +0200 Subject: [PATCH] Clarify ordering Signed-off-by: Marco Pracucci --- model/labels/regexp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/labels/regexp.go b/model/labels/regexp.go index da22b1000b..92f71b0345 100644 --- a/model/labels/regexp.go +++ b/model/labels/regexp.go @@ -482,7 +482,7 @@ func stringMatcherFromRegexpInternal(re *syntax.Regexp) StringMatcher { return anyStringWithoutNewlineMatcher{} case syntax.OpQuest: // Only optimize for ".?". - if len(re.Sub) != 1 || re.Sub[0].Op != syntax.OpAnyChar && re.Sub[0].Op != syntax.OpAnyCharNotNL { + if len(re.Sub) != 1 || (re.Sub[0].Op != syntax.OpAnyChar && re.Sub[0].Op != syntax.OpAnyCharNotNL) { return nil }