mirror of
https://github.com/golang/go
synced 2024-11-20 10:04:45 -07:00
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
This commit is contained in:
parent
d9c4cef670
commit
b04bf3882b
@ -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() != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user