Commit 7f94bd09 authored by obscuren's avatar obscuren

Return a single byte if byte get called

parent 2fbcfd88
......@@ -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{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment