diff --git a/common/bytes.go b/common/bytes.go index d1f5c6c995..0c9b98beee 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -62,8 +62,8 @@ func isHex(str string) bool { if len(str)%2 != 0 { return false } - for _, c := range []byte(str) { - if !isHexCharacter(c) { + for i := 0; i < len(str); i++ { + if !isHexCharacter(str[i]) { return false } }