Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Oct 31, 2023
1 parent 24a9267 commit e5a36ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec/reflectcodec/type_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ func (c *genericCodec) unmarshal(
return p.Err
}
// Unmarshal each element and append it into the slice.
value.Set(reflect.MakeSlice(value.Type(), 0, initialSliceLen))
value.Set(reflect.MakeSlice(sliceType, 0, initialSliceLen))
zeroValue := reflect.Zero(innerType)
for i := 0; i < numElts; i++ {
value.Set(reflect.Append(value, zeroValue))
Expand Down

0 comments on commit e5a36ca

Please sign in to comment.