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/xf86dri/xf86dri.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nexgb/xf86dri') diff --git a/nexgb/xf86dri/xf86dri.go b/nexgb/xf86dri/xf86dri.go index 46fabca..65fcfa0 100644 --- a/nexgb/xf86dri/xf86dri.go +++ b/nexgb/xf86dri/xf86dri.go @@ -659,7 +659,7 @@ func getClientDriverNameReply(buf []byte) *GetClientDriverNameReply { byteString := make([]byte, v.ClientDriverNameLen) copy(byteString[:v.ClientDriverNameLen], buf[b:]) v.ClientDriverName = string(byteString) - b += xgb.Pad(int(v.ClientDriverNameLen)) + b += int(v.ClientDriverNameLen) } return v @@ -1017,7 +1017,7 @@ func openConnectionReply(buf []byte) *OpenConnectionReply { byteString := make([]byte, v.BusIdLen) copy(byteString[:v.BusIdLen], buf[b:]) v.BusId = string(byteString) - b += xgb.Pad(int(v.BusIdLen)) + b += int(v.BusIdLen) } return v -- cgit v1.2.3