diff options
author | Andrew Gallant <jamslam@gmail.com> | 2013-12-28 10:02:18 -0500 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:21 +0200 |
commit | 33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230 (patch) | |
tree | ce7d66adcb2e7fd3802a884b0fae618dfa1533a6 /nexgb/xv/xv.go | |
parent | ad9c35a02f190ea5da59c9c4a3aeddcf7e8a5c1f (diff) | |
download | haven-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/xv/xv.go')
-rw-r--r-- | nexgb/xv/xv.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nexgb/xv/xv.go b/nexgb/xv/xv.go index d79a594..32bdd9e 100644 --- a/nexgb/xv/xv.go +++ b/nexgb/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 |