aboutsummaryrefslogtreecommitdiffstats
path: root/common/bytes.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/bytes.go')
-rw-r--r--common/bytes.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/bytes.go b/common/bytes.go
index 66577bbfd..bb40ac1d7 100644
--- a/common/bytes.go
+++ b/common/bytes.go
@@ -35,12 +35,11 @@ func FromHex(s string) []byte {
if s[0:2] == "0x" || s[0:2] == "0X" {
s = s[2:]
}
- if len(s)%2 == 1 {
- s = "0" + s
- }
- return Hex2Bytes(s)
}
- return nil
+ if len(s)%2 == 1 {
+ s = "0" + s
+ }
+ return Hex2Bytes(s)
}
// Copy bytes