summaryrefslogtreecommitdiff
path: root/dri2/dri2.go
diff options
context:
space:
mode:
authorAndrew Gallant <[email protected]>2013-12-28 10:02:18 -0500
committerAndrew Gallant <[email protected]>2013-12-28 10:02:18 -0500
commitc3541209a0fb8271645c882f7e4a4d7254823992 (patch)
tree1bf8042cbe4c01f8f2b74640142ef35ba9e12630 /dri2/dri2.go
parent276338409158b6e8f45afadc94bd16532a369ef8 (diff)
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 'dri2/dri2.go')
-rw-r--r--dri2/dri2.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/dri2/dri2.go b/dri2/dri2.go
index df13661..6cec3d0 100644
--- a/dri2/dri2.go
+++ b/dri2/dri2.go
@@ -562,7 +562,7 @@ func connectReply(buf []byte) *ConnectReply {
byteString := make([]byte, v.DriverNameLength)
copy(byteString[:v.DriverNameLength], buf[b:])
v.DriverName = string(byteString)
- b += xgb.Pad(int(v.DriverNameLength))
+ b += int(v.DriverNameLength)
}
v.AlignmentPad = make([]byte, (((int(v.DriverNameLength) + 3) & -4) - int(v.DriverNameLength)))
@@ -573,7 +573,7 @@ func connectReply(buf []byte) *ConnectReply {
byteString := make([]byte, v.DeviceNameLength)
copy(byteString[:v.DeviceNameLength], buf[b:])
v.DeviceName = string(byteString)
- b += xgb.Pad(int(v.DeviceNameLength))
+ b += int(v.DeviceNameLength)
}
return v