1
0
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:
Rob Pike 2010-03-03 12:35:16 -08:00
parent 3b82f295b4
commit 90367756bb

View File

@ -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 {