diff --git a/common/bytes.go b/common/bytes.go index 61499b521e..98d493a784 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -30,7 +30,7 @@ func FromHex(s string) []byte { if has0xPrefix(s) { s = s[2:] } - if len(s)&1 == 1 { + if len(s)%2 == 1 { s = "0" + s } return Hex2Bytes(s)