From cc9a9dc2cdcca756b4cb8e926b9627912536c3a8 Mon Sep 17 00:00:00 2001 From: siddharth Date: Sat, 16 Oct 2021 14:38:48 -0400 Subject: lib: fix HexStrToBytes --- lib/hex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3