Skip to content

Commit dd77e3c

Browse files
authored
fix(args): parse slice indexes as 32 bits (#2847)
1 parent ac91828 commit dd77e3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/args/unmarshal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func set(dest reflect.Value, argNameWords []string, value string) error {
260260
}
261261

262262
// We check if argNameWords[0] is a positive integer to handle cases like keys.0.value=12
263-
index, err := strconv.ParseUint(argNameWords[0], 10, 64)
263+
index, err := strconv.ParseUint(argNameWords[0], 10, 32) // a slice index is 32 bit
264264
if err != nil {
265265
return &InvalidIndexError{Index: argNameWords[0]}
266266
}

0 commit comments

Comments
 (0)