From 96d7c8d4a85e7c5bb317b6c737d5b2dbf0e69c25 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Tue, 10 Aug 2010 15:53:19 +1000 Subject: [PATCH] exp/draw/x11: temporarily workaround compiler bug 1011. R=r CC=golang-dev https://golang.org/cl/1951041 --- src/pkg/exp/draw/x11/auth.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pkg/exp/draw/x11/auth.go b/src/pkg/exp/draw/x11/auth.go index 896dedf05c7..b4c75a360d8 100644 --- a/src/pkg/exp/draw/x11/auth.go +++ b/src/pkg/exp/draw/x11/auth.go @@ -16,7 +16,10 @@ func readU16BE(r io.Reader, b []byte) (uint16, os.Error) { if err != nil { return 0, err } - return uint16(b[0])<<8 + uint16(b[1]), nil + // TODO(nigeltao): remove the workaround when bug 1011 gets fixed. + //return uint16(b[0])<<8 + uint16(b[1]), nil + ret := uint16(b[0])<<8 + uint16(b[1]) + return ret, nil } // readStr reads a length-prefixed string from r, using b as a scratch buffer.