aboutsummaryrefslogtreecommitdiff
path: root/nexgb/glx/glx.go
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2013-12-28 10:02:18 -0500
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:21 +0200
commit33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230 (patch)
treece7d66adcb2e7fd3802a884b0fae618dfa1533a6 /nexgb/glx/glx.go
parentad9c35a02f190ea5da59c9c4a3aeddcf7e8a5c1f (diff)
downloadhaven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.tar.gz
haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.tar.xz
haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.zip
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.
Diffstat (limited to 'nexgb/glx/glx.go')
-rw-r--r--nexgb/glx/glx.go4
1 files changed, 2 insertions, 2 deletions
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