mirror of
https://github.com/golang/go.git
synced 2025-11-08 12:41:02 +00:00
gobs: fix bug in singleton arrays
Fixes #934. R=rsc CC=golang-dev https://golang.org/cl/1869043
This commit is contained in:
parent
8f9aeb5a66
commit
a0d1c9263e
2 changed files with 4 additions and 5 deletions
|
|
@ -722,10 +722,6 @@ func encOpFor(rt reflect.Type) (encOp, int, os.Error) {
|
|||
return nil, 0, err
|
||||
}
|
||||
op = func(i *encInstr, state *encoderState, p unsafe.Pointer) {
|
||||
slice := (*reflect.SliceHeader)(p)
|
||||
if slice.Len == 0 {
|
||||
return
|
||||
}
|
||||
state.update(i)
|
||||
state.err = encodeArray(state.b, uintptr(p), elemOp, t.Elem().Size(), indir, t.Len())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue