From 2dc9914b5e6b74c353771e56e90dfd2dd33e0202 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 28 Dec 2013 09:33:09 -0500 Subject: 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. --- nexgb/damage/damage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nexgb/damage/damage.go') 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 -- cgit v1.2.3-70-g09d2