aboutsummaryrefslogtreecommitdiffstats
path: root/rlp/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'rlp/decode.go')
-rw-r--r--rlp/decode.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/rlp/decode.go b/rlp/decode.go
index 1a51e7130..96d912f56 100644
--- a/rlp/decode.go
+++ b/rlp/decode.go
@@ -309,6 +309,7 @@ func makePtrDecoder(typ reflect.Type) (decoder, error) {
dec := func(s *Stream, val reflect.Value) (err error) {
_, size, err := s.Kind()
if err != nil || size == 0 && s.byteval == 0 {
+ val.Set(reflect.Zero(typ)) // set to nil
return err
}
newval := val