From 7f94bd09ae5791836d94d4d9efb9e345212e49b6 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 18 Jun 2014 13:47:40 +0200 Subject: [PATCH] Return a single byte if byte get called --- ethutil/value.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethutil/value.go b/ethutil/value.go index c86c24a7a7..ddd864d8a3 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{}