mirror of
https://github.com/golang/go
synced 2024-11-20 04:54:44 -07:00
encoding/binary: fix error reporting bug
R=rsc CC=golang-dev https://golang.org/cl/224096
This commit is contained in:
parent
3b82f295b4
commit
90367756bb
@ -128,7 +128,7 @@ func Read(r io.Reader, order ByteOrder, data interface{}) os.Error {
|
||||
case *reflect.SliceValue:
|
||||
v = d
|
||||
default:
|
||||
return os.NewError("binary.Read: invalid type " + v.Type().String())
|
||||
return os.NewError("binary.Read: invalid type " + d.Type().String())
|
||||
}
|
||||
size := TotalSize(v)
|
||||
if size < 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user