summaryrefslogtreecommitdiff
path: root/xf86vidmode/xf86vidmode.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 /xf86vidmode/xf86vidmode.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 'xf86vidmode/xf86vidmode.go')
-rw-r--r--xf86vidmode/xf86vidmode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/xf86vidmode/xf86vidmode.go b/xf86vidmode/xf86vidmode.go
index 5a3f63d..44228c4 100644
--- a/xf86vidmode/xf86vidmode.go
+++ b/xf86vidmode/xf86vidmode.go
@@ -1543,7 +1543,7 @@ func getMonitorReply(buf []byte) *GetMonitorReply {
byteString := make([]byte, v.VendorLength)
copy(byteString[:v.VendorLength], buf[b:])
v.Vendor = string(byteString)
- b += xgb.Pad(int(v.VendorLength))
+ b += int(v.VendorLength)
}
v.AlignmentPad = make([]byte, (((int(v.VendorLength) + 3) & -4) - int(v.VendorLength)))
@@ -1554,7 +1554,7 @@ func getMonitorReply(buf []byte) *GetMonitorReply {
byteString := make([]byte, v.ModelLength)
copy(byteString[:v.ModelLength], buf[b:])
v.Model = string(byteString)
- b += xgb.Pad(int(v.ModelLength))
+ b += int(v.ModelLength)
}
return v