diff options
Diffstat (limited to 'proto/io.go')
-rw-r--r-- | proto/io.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/proto/io.go b/proto/io.go index 597b1b3..fa40be3 100644 --- a/proto/io.go +++ b/proto/io.go @@ -126,13 +126,13 @@ func Read(fd io.Reader, data interface{}) { case *string: var len int32 Read(fd, &len) - buf := make([]byte, len) + buf := make([]byte, len) // BUG(lukeshu): Read: `string` length needs sanity checked Read(fd, &buf) *data = string(buf) case *[]string: var num int32 Read(fd, &num) - *data = make([]string, num) + *data = make([]string, num) // BUG(lukeshu): Read: `[]string` length needs sanity checked for i := 0; i < int(num); i++ { Read(fd, &((*data)[i])) } @@ -159,7 +159,7 @@ func Read(fd io.Reader, data interface{}) { case *[]net.IP: var num int32 Read(fd, &num) - *data = make([]net.IP, num) + *data = make([]net.IP, num) // BUG(lukeshu): Read: `[]net.IP` length needs sanity checked for i := 0; i < int(num); i++ { Read(fd, &((*data)[i])) } |