summaryrefslogtreecommitdiff
path: root/xv/xv.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 /xv/xv.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 'xv/xv.go')
-rw-r--r--xv/xv.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/xv/xv.go b/xv/xv.go
index d79a594..32bdd9e 100644
--- a/xv/xv.go
+++ b/xv/xv.go
@@ -74,7 +74,7 @@ func AdaptorInfoRead(buf []byte, v *AdaptorInfo) int {
byteString := make([]byte, v.NameSize)
copy(byteString[:v.NameSize], buf[b:])
v.Name = string(byteString)
- b += xgb.Pad(int(v.NameSize))
+ b += int(v.NameSize)
}
v.Formats = make([]Format, v.NumFormats)
@@ -177,7 +177,7 @@ func AttributeInfoRead(buf []byte, v *AttributeInfo) int {
byteString := make([]byte, v.Size)
copy(byteString[:v.Size], buf[b:])
v.Name = string(byteString)
- b += xgb.Pad(int(v.Size))
+ b += int(v.Size)
}
return b
@@ -420,7 +420,7 @@ func EncodingInfoRead(buf []byte, v *EncodingInfo) int {
byteString := make([]byte, v.NameSize)
copy(byteString[:v.NameSize], buf[b:])
v.Name = string(byteString)
- b += xgb.Pad(int(v.NameSize))
+ b += int(v.NameSize)
}
return b