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/damage/damage.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/damage/damage.go')
-rw-r--r-- | nexgb/damage/damage.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nexgb/damage/damage.go b/nexgb/damage/damage.go index 0ab7668..e94936d 100644 --- a/nexgb/damage/damage.go +++ b/nexgb/damage/damage.go @@ -162,13 +162,13 @@ func (v NotifyEvent) Bytes() []byte { { structBytes := v.Area.Bytes() copy(buf[b:], structBytes) - b += xgb.Pad(len(structBytes)) + b += len(structBytes) } { structBytes := v.Geometry.Bytes() copy(buf[b:], structBytes) - b += xgb.Pad(len(structBytes)) + b += len(structBytes) } return buf |