From: Michael Tremer Date: Tue, 15 Oct 2019 15:06:31 +0000 (+0000) Subject: writer: Write countries before pool is being written X-Git-Tag: 0.9.0~31 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Flibloc.git;a=commitdiff_plain;h=47bea9419ef74adeeb666d26c48d44b378102168 writer: Write countries before pool is being written Otherwise the names will obviously not be written Signed-off-by: Michael Tremer --- diff --git a/src/writer.c b/src/writer.c index bf3d2bb..60a129b 100644 --- a/src/writer.c +++ b/src/writer.c @@ -507,13 +507,13 @@ LOC_EXPORT int loc_writer_write(struct loc_writer* writer, FILE* f) { if (r) return r; - // Write pool - r = loc_database_write_pool(writer, &header, &offset, f); + // Write countries + r = loc_database_write_countries(writer, &header, &offset, f); if (r) return r; - // Write countries - r = loc_database_write_countries(writer, &header, &offset, f); + // Write pool + r = loc_database_write_pool(writer, &header, &offset, f); if (r) return r;