Commit b04bf388 authored by Rob Pike's avatar Rob Pike

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
parent d9c4cef6
......@@ -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() != "" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment