You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
package main
import (
"bytes"
"fmt"
"gob"
)
func main() {
a := [3]int{2, 1, 0}
b := new(bytes.Buffer)
gob.NewEncoder(b).Encode(a)
err := gob.NewDecoder(b).Decode(&a)
fmt.Println(err)
}
What is the expected output?
<nil>
What do you see instead?
gob: length mismatch in decodeArray
What is your $GOOS? $GOARCH?
linux amd64
Which revision are you using? (hg identify)
20b5026b3332+ tip
Please provide any additional information below.
This is a little different than issue #459. That regression test on arrays inside of
structs still passes. This naked array (which wasn't allowed at the time of issue #459)
fails. Also, it only seems to fail when a trailing element is zero. Zeros at the
beginning and middle are okay.
The text was updated successfully, but these errors were encountered:
by sonia1427:
The text was updated successfully, but these errors were encountered: