mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
gob: add test for indirect maps, slices, arrays.
fix a bug in the handling of indirect maps. R=rsc CC=golang-dev https://golang.org/cl/1132042
This commit is contained in:
parent
6dbba67214
commit
9088f9f245
2 changed files with 67 additions and 3 deletions
|
|
@ -599,9 +599,6 @@ func (dec *Decoder) decOpFor(wireId typeId, rt reflect.Type, name string) (decOp
|
|||
ovfl := overflow(name)
|
||||
op = func(i *decInstr, state *decodeState, p unsafe.Pointer) {
|
||||
up := unsafe.Pointer(p)
|
||||
if indir > 1 {
|
||||
up = decIndirect(up, indir)
|
||||
}
|
||||
state.err = decodeMap(t, state, uintptr(up), keyOp, elemOp, i.indir, keyIndir, elemIndir, ovfl)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue