From: Rob Pike Date: Tue, 3 Jul 2012 17:05:27 +0000 (-0700) Subject: encoding/gob: fix bug in Register X-Git-Tag: go1.1rc2~2837 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b04bf3882b403ebba3b4c80297daa91dd56a1f85;p=gostls13.git encoding/gob: fix bug in Register The old code added a star but did not indirect the reflect.Type. R=bradfitz CC=golang-dev https://golang.org/cl/6348067 --- diff --git a/src/pkg/encoding/gob/type.go b/src/pkg/encoding/gob/type.go index 0dd7a0a770..908cc9ce1c 100644 --- a/src/pkg/encoding/gob/type.go +++ b/src/pkg/encoding/gob/type.go @@ -755,7 +755,7 @@ func Register(value interface{}) { if rt.Name() == "" { if pt := rt; pt.Kind() == reflect.Ptr { star = "*" - rt = pt + rt = pt.Elem() } } if rt.Name() != "" {