go: Fix length mask error in []byte packing.

This commit is contained in:
Damian Gryski 2012-02-28 22:54:54 +01:00
parent 8f35dbc306
commit 31a49db68b

View File

@ -174,7 +174,7 @@ func unpack(reader io.Reader, reflected bool) (v reflect.Value, n int, err error
} }
nbytesread += n nbytesread += n
} else if c >= 0xa0 && c <= 0xbf { } else if c >= 0xa0 && c <= 0xbf {
data := make([]byte, c&0xf) data := make([]byte, c&0x1f)
n, e := reader.Read(data) n, e := reader.Read(data)
nbytesread += n nbytesread += n
if e != nil { if e != nil {