Skip to content

Commit 9add5df

Browse files
authored
Merge pull request #2716 from taraspos/patch-1
fix(customresourcestate): fix index out of range
2 parents 61cb551 + dc54dc6 commit 9add5df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/customresourcestate/registry_factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ func compilePath(path []string) (out valuePath, _ error) {
652652
// negative index
653653
i += len(s)
654654
}
655-
if i < 0 || i > len(s) {
655+
if i < 0 || i >= len(s) {
656656
return fmt.Errorf("list index out of range: %s", part)
657657
}
658658
return s[i]

0 commit comments

Comments
 (0)