diff --git a/laymanshex.go b/laymanshex.go index a7f1a9b..ef4e284 100644 --- a/laymanshex.go +++ b/laymanshex.go @@ -173,6 +173,7 @@ func (part *filePart) setHandling() { return hex.EncodeToString(buf) } writeTo := func(w io.Writer, bo binary.ByteOrder, s string) { + s = strings.TrimPrefix(s, "0x") buf, err := hex.DecodeString(s) optPanic("invalid string of hex values: "+s, err) if int64(len(buf)) > bytes {