diff options
author | Andrew Gallant <jamslam@gmail.com> | 2013-12-28 09:33:09 -0500 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:20 +0200 |
commit | 2dc9914b5e6b74c353771e56e90dfd2dd33e0202 (patch) | |
tree | 8b9c5a460be7a11c23d46be1887ebcaee1eb33b7 /nexgb/xproto/xproto.go | |
parent | f0385db3a71c33f19d27dafb2a5d158a8a875200 (diff) | |
download | haven-2dc9914b5e6b74c353771e56e90dfd2dd33e0202.tar.gz haven-2dc9914b5e6b74c353771e56e90dfd2dd33e0202.tar.xz haven-2dc9914b5e6b74c353771e56e90dfd2dd33e0202.zip |
When writing, don't pad the length of bytes produced from inner
structs/unions. Each type should take care of its own padding.
Close #14.
Diffstat (limited to 'nexgb/xproto/xproto.go')
-rw-r--r-- | nexgb/xproto/xproto.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nexgb/xproto/xproto.go b/nexgb/xproto/xproto.go index 9b33030..5579ba9 100644 --- a/nexgb/xproto/xproto.go +++ b/nexgb/xproto/xproto.go @@ -886,7 +886,7 @@ func (v ClientMessageEvent) Bytes() []byte { { unionBytes := v.Data.Bytes() copy(buf[b:], unionBytes) - b += xgb.Pad(len(unionBytes)) + b += len(unionBytes) } return buf |