Skip to content

Commit a6fe087

Browse files
tarasposrashmichandrashekar
authored andcommitted
customresourcestate: fix panic
1 parent 2691a93 commit a6fe087

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)