Padding on a list is on the length of the list.

There was a bug where padding was being computed on each element of the
list. Close #5.
This commit is contained in:
Andrew Gallant
2013-08-11 20:54:15 -04:00
committed by Přemysl Janouch
parent b06a8ca976
commit 38b293e74d
17 changed files with 222 additions and 222 deletions

View File

@@ -86,9 +86,9 @@ func AttachFormatListBytes(buf []byte, list []AttachFormat) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes))
b += len(structBytes)
}
return b
return xgb.Pad(b)
}
const (
@@ -291,9 +291,9 @@ func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes))
b += len(structBytes)
}
return b
return xgb.Pad(b)
}
const (