Skip to content

Commit 3e6d7c1

Browse files
committed
cmd/rlpdump: allow hex input to have leading '0x'
1 parent 0095531 commit 3e6d7c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎cmd/rlpdump/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func main() {
5151
var r io.Reader
5252
switch {
5353
case *hexMode != "":
54-
data, err := hex.DecodeString(*hexMode)
54+
data, err := hex.DecodeString(strings.TrimPrefix(*hexMode, "0x"))
5555
if err != nil {
5656
die(err)
5757
}

0 commit comments

Comments
 (0)