Go: enable multiple updates in a sequence

This is not something anyone should do, but let's do things correctly.
This commit is contained in:
Přemysl Eric Janouch 2024-02-04 05:17:26 +01:00
parent ff7de4b141
commit 32e9acfa77
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 3 additions and 0 deletions

View File

@ -1271,6 +1271,9 @@ func (u *Updater) FlushUpdates() {
fmt.Fprintf(buf, "\nstartxref\n%d\n%%%%EOF\n", startXref)
u.Document = buf.Bytes()
u.updated = make(map[uint]struct{})
u.Trailer["Prev"] = NewNumeric(float64(startXref))
}
// -----------------------------------------------------------------------------