mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
Update types.go
This commit is contained in:
parent
0e1b7bd118
commit
1ea78b8937
1 changed files with 1 additions and 1 deletions
|
|
@ -544,7 +544,7 @@ func parseBytes(encType interface{}) ([]byte, bool) {
|
|||
// Handle array types.
|
||||
val := reflect.ValueOf(encType)
|
||||
if val.Kind() == reflect.Array && val.Type().Elem().Kind() == reflect.Uint8 {
|
||||
v := reflect.MakeSlice(reflect.TypeFor[[]byte](), val.Len(), val.Len())
|
||||
v := reflect.ValueOf(make([]byte, val.Len()))
|
||||
reflect.Copy(v, val)
|
||||
return v.Bytes(), true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue