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/glx/glx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nexgb/glx/glx.go') diff --git a/nexgb/glx/glx.go b/nexgb/glx/glx.go index 2db5798..979d577 100644 --- a/nexgb/glx/glx.go +++ b/nexgb/glx/glx.go @@ -6885,7 +6885,7 @@ func getStringReply(buf []byte) *GetStringReply { byteString := make([]byte, v.N) copy(byteString[:v.N], buf[b:]) v.String = string(byteString) - b += xgb.Pad(int(v.N)) + b += int(v.N) } return v @@ -9174,7 +9174,7 @@ func queryServerStringReply(buf []byte) *QueryServerStringReply { byteString := make([]byte, v.StrLen) copy(byteString[:v.StrLen], buf[b:]) v.String = string(byteString) - b += xgb.Pad(int(v.StrLen)) + b += int(v.StrLen) } return v -- cgit v1.2.3-70-g09d2