summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/hex.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hex.go b/lib/hex.go
index f07ba08..ff5ee27 100644
--- a/lib/hex.go
+++ b/lib/hex.go
@@ -34,11 +34,11 @@ func HexStrToAsciiStr(h string) string {
return a
}
if lh == 1 {
- return string(HexCharToDec(h[0]))
+ return string(byte(HexCharToDec(h[0])))
}
for i := 0; i < lh; i += 2 {
- b := HexCharToDec(h[i])<<4 | HexCharToDec(h[i+1])
+ b := byte(HexCharToDec(h[i])<<4 | HexCharToDec(h[i+1]))
a += string(b)
}
return a