diff options
| author | Andrew Gallant <[email protected]> | 2013-08-11 20:54:15 -0400 |
|---|---|---|
| committer | Andrew Gallant <[email protected]> | 2013-08-11 20:54:15 -0400 |
| commit | eb7c38953b074e33f86861a3da4c05623cd44fc6 (patch) | |
| tree | 0393a0a57afb536c401afb5e3587384c282ddd00 /xgbgen/go_struct.go | |
| parent | 8bc7a097c3aeddc1832d47cd74a9a365ab1f86ad (diff) | |
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.
Diffstat (limited to 'xgbgen/go_struct.go')
| -rw-r--r-- | xgbgen/go_struct.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xgbgen/go_struct.go b/xgbgen/go_struct.go index 984a336..0f18084 100644 --- a/xgbgen/go_struct.go +++ b/xgbgen/go_struct.go @@ -93,9 +93,9 @@ func (s *Struct) WriteList(c *Context) { c.Putln("for _, item := range list {") c.Putln("structBytes = item.Bytes()") c.Putln("copy(buf[b:], structBytes)") - c.Putln("b += xgb.Pad(len(structBytes))") + c.Putln("b += len(structBytes)") c.Putln("}") - c.Putln("return b") + c.Putln("return xgb.Pad(b)") c.Putln("}") c.Putln("") } |
