From 33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 28 Dec 2013 10:02:18 -0500 Subject: It appears that the "Str" type (which is built into the core X protocol) doesn't specify any padding. So it has to be treated as a special case. Close #12. --- nexgb/xfixes/xfixes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nexgb/xfixes') diff --git a/nexgb/xfixes/xfixes.go b/nexgb/xfixes/xfixes.go index a34df54..9a08c93 100644 --- a/nexgb/xfixes/xfixes.go +++ b/nexgb/xfixes/xfixes.go @@ -1495,7 +1495,7 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply { byteString := make([]byte, v.Nbytes) copy(byteString[:v.Nbytes], buf[b:]) v.Name = string(byteString) - b += xgb.Pad(int(v.Nbytes)) + b += int(v.Nbytes) } v.CursorImage = make([]uint32, (int(v.Width) * int(v.Height))) @@ -1602,7 +1602,7 @@ func getCursorNameReply(buf []byte) *GetCursorNameReply { byteString := make([]byte, v.Nbytes) copy(byteString[:v.Nbytes], buf[b:]) v.Name = string(byteString) - b += xgb.Pad(int(v.Nbytes)) + b += int(v.Nbytes) } return v -- cgit v1.2.3-70-g09d2