summaryrefslogtreecommitdiffstats
path: root/lib/hex.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hex.go')
-rw-r--r--lib/hex.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hex.go b/lib/hex.go
index ff5ee27..8298b9d 100644
--- a/lib/hex.go
+++ b/lib/hex.go
@@ -48,7 +48,7 @@ func HexStrToAsciiStr(h string) string {
func HexStrToBytes(h string) []byte {
lh := len(h)
- if lh < 1 {
+ if lh < 1 || lh%2 != 0 {
return []byte{}
}
if lh == 1 {