aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-18 19:47:40 +0800
committerobscuren <geffobscura@gmail.com>2014-06-18 19:47:40 +0800
commit7f94bd09ae5791836d94d4d9efb9e345212e49b6 (patch)
tree929cb9a7ce0e3b287895448ef6171e80a48157f4 /ethutil
parent2fbcfd88249de8f55b7f06619d9003fadcc8e1e3 (diff)
downloadgo-tangerine-7f94bd09ae5791836d94d4d9efb9e345212e49b6.tar.gz
go-tangerine-7f94bd09ae5791836d94d4d9efb9e345212e49b6.tar.zst
go-tangerine-7f94bd09ae5791836d94d4d9efb9e345212e49b6.zip
Return a single byte if byte get called
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/value.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/ethutil/value.go b/ethutil/value.go
index c86c24a7a..ddd864d8a 100644
--- a/ethutil/value.go
+++ b/ethutil/value.go
@@ -114,6 +114,8 @@ func (val *Value) Str() string {
func (val *Value) Bytes() []byte {
if a, ok := val.Val.([]byte); ok {
return a
+ } else if s, ok := val.Val.(byte); ok {
+ return []byte{s}
}
return []byte{}