From 31a49db68b0368e54a44c2d92ad41b814549d018 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Tue, 28 Feb 2012 22:54:54 +0100 Subject: [PATCH] go: Fix length mask error in []byte packing. --- go/unpack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/unpack.go b/go/unpack.go index cf1911d2..0f34695f 100644 --- a/go/unpack.go +++ b/go/unpack.go @@ -174,7 +174,7 @@ func unpack(reader io.Reader, reflected bool) (v reflect.Value, n int, err error } nbytesread += n } else if c >= 0xa0 && c <= 0xbf { - data := make([]byte, c&0xf) + data := make([]byte, c&0x1f) n, e := reader.Read(data) nbytesread += n if e != nil {