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/xfixes/xfixes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nexgb/xfixes') diff --git a/nexgb/xfixes/xfixes.go b/nexgb/xfixes/xfixes.go index 0424585..a34df54 100644 --- a/nexgb/xfixes/xfixes.go +++ b/nexgb/xfixes/xfixes.go @@ -1801,7 +1801,7 @@ func invertRegionRequest(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, De { structBytes := Bounds.Bytes() copy(buf[b:], structBytes) - b += xgb.Pad(len(structBytes)) + b += len(structBytes) } xgb.Put32(buf[b:], uint32(Destination)) -- cgit v1.2.3