summaryrefslogtreecommitdiff
path: root/res/res.go
diff options
context:
space:
mode:
authorAndrew Gallant <[email protected]>2013-12-28 09:33:09 -0500
committerAndrew Gallant <[email protected]>2013-12-28 09:33:09 -0500
commit34dd98df049a0a6ecf661ff9fdfe31292688040a (patch)
treeb2cbe9e643ec6271bbcbdf8c1030a56575d57109 /res/res.go
parent9071499d31a04ae4e2e545e2f2227545d32187a4 (diff)
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 'res/res.go')
-rw-r--r--res/res.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res.go b/res/res.go
index 43480ec..59a416a 100644
--- a/res/res.go
+++ b/res/res.go
@@ -194,7 +194,7 @@ func (v ClientIdValue) Bytes() []byte {
{
structBytes := v.Spec.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
xgb.Put32(buf[b:], v.Length)
@@ -328,7 +328,7 @@ func (v ResourceSizeSpec) Bytes() []byte {
{
structBytes := v.Spec.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
xgb.Put32(buf[b:], v.Bytes)
@@ -395,7 +395,7 @@ func (v ResourceSizeValue) Bytes() []byte {
{
structBytes := v.Size.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
xgb.Put32(buf[b:], v.NumCrossReferences)