From a0eb89f0d545afa1c15697bbba0c4cefe8034775 Mon Sep 17 00:00:00 2001 From: kane Date: Thu, 13 Dec 2018 03:49:09 -0500 Subject: [PATCH] common/hexutil: return err --- common/hexutil/json.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/hexutil/json.go b/common/hexutil/json.go index fbc21241c8..f5f5dbb7b5 100644 --- a/common/hexutil/json.go +++ b/common/hexutil/json.go @@ -99,8 +99,8 @@ func UnmarshalFixedText(typname string, input, out []byte) error { return ErrSyntax } } - hex.Decode(out, raw) - return nil + _, err = hex.Decode(out, raw) + return err } // UnmarshalFixedUnprefixedText decodes the input as a string with optional 0x prefix. The @@ -120,8 +120,8 @@ func UnmarshalFixedUnprefixedText(typname string, input, out []byte) error { return ErrSyntax } } - hex.Decode(out, raw) - return nil + _, err = hex.Decode(out, raw) + return err } // Big marshals/unmarshals as a JSON string with 0x prefix.