From d3c0b558fab33331de55e927a1f6d3a459bc4f41 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Fri, 19 May 2017 12:17:15 -0700 Subject: [PATCH] common: parse single-digit hex addresses correctly --- common/bytes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bytes.go b/common/bytes.go index 0342083a1e..04621b2583 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -39,6 +39,8 @@ func FromHex(s string) []byte { s = "0" + s } return Hex2Bytes(s) + } else if len(s) == 1 { + return Hex2Bytes("0" + s) } return nil }