From 254aec1b27d3593080aef0157505c44363d76cae Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sat, 9 Jul 2022 14:10:44 +0200 Subject: multiple war crimes --- serialize.fmt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'serialize.fmt') diff --git a/serialize.fmt b/serialize.fmt index d021217..d7c2bb4 100644 --- a/serialize.fmt +++ b/serialize.fmt @@ -2,21 +2,21 @@ _, err := w.Write([]byte{x}) chk(err) } - + func write16(w io.Writer, x uint16) { buf := make([]byte, 2) be.PutUint16(buf, x) _, err := w.Write(buf) chk(err) } - + func write32(w io.Writer, x uint32) { buf := make([]byte, 4) be.PutUint32(buf, x) _, err := w.Write(buf) chk(err) } - + func write64(w io.Writer, x uint64) { buf := make([]byte, 8) be.PutUint64(buf, x) @@ -150,7 +150,7 @@ PointedThing chk(writePointedThing(w, x)) write16(w, uint16(len(x))) var b bytes.Buffer for i := range x { - x[i].serialize(&b) + x[i].Serialize(&b) } if b.Len() > math.MaxUint32 { chk(ErrTooLong) -- cgit v1.2.3