aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen/go_single_field.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xgbgen/go_single_field.go')
-rw-r--r--nexgb/xgbgen/go_single_field.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/nexgb/xgbgen/go_single_field.go b/nexgb/xgbgen/go_single_field.go
index 3e3fa53..6c7218e 100644
--- a/nexgb/xgbgen/go_single_field.go
+++ b/nexgb/xgbgen/go_single_field.go
@@ -152,13 +152,13 @@ func (f *SingleField) Write(c *Context, prefix string) {
c.Putln("{")
c.Putln("unionBytes := %s%s.Bytes()", prefix, f.SrcName())
c.Putln("copy(buf[b:], unionBytes)")
- c.Putln("b += xgb.Pad(len(unionBytes))")
+ c.Putln("b += len(unionBytes)")
c.Putln("}")
case *Struct:
c.Putln("{")
c.Putln("structBytes := %s%s.Bytes()", prefix, f.SrcName())
c.Putln("copy(buf[b:], structBytes)")
- c.Putln("b += xgb.Pad(len(structBytes))")
+ c.Putln("b += len(structBytes)")
c.Putln("}")
default:
log.Fatalf("Cannot read field '%s' with %T type.", f.XmlName(), f.Type)