Skip to content

Commit dc54dc6

Browse files
authored
customresourcestate: fix panic
1 parent 61be81f commit dc54dc6

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)