mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 13:59:26 +00:00
Return a single byte if byte get called
This commit is contained in:
parent
2fbcfd8824
commit
7f94bd09ae
1 changed files with 2 additions and 0 deletions
|
|
@ -114,6 +114,8 @@ func (val *Value) Str() string {
|
||||||
func (val *Value) Bytes() []byte {
|
func (val *Value) Bytes() []byte {
|
||||||
if a, ok := val.Val.([]byte); ok {
|
if a, ok := val.Val.([]byte); ok {
|
||||||
return a
|
return a
|
||||||
|
} else if s, ok := val.Val.(byte); ok {
|
||||||
|
return []byte{s}
|
||||||
}
|
}
|
||||||
|
|
||||||
return []byte{}
|
return []byte{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue