rdoff/rdfwriteheader: Write object length and header length in correct order

Compared to 2.12.xx rdfwriteheader() writes the object length and header
length in flipped order.  Issue seems to have been introduced by commit
8dc965347ddf.

BR3392717

Signed-off-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Ozkan Sezer 2020-10-05 00:41:40 +03:00 committed by Cyrill Gorcunov
parent c2ea414eb3
commit 723fb2cc33

View File

@ -612,8 +612,8 @@ int rdfwriteheader(FILE * fp, rdf_headerbuf * h)
l = membuflength(h->buf);
l2 = l + 14 + 10 * h->nsegments + h->seglength;
fwriteint32_t(l, fp);
fwriteint32_t(l2, fp);
fwriteint32_t(l2, fp); /* object length */
fwriteint32_t(l, fp); /* header length */
membufdump(h->buf, fp);