From 25f6d6bd2a270f474f37ba10abe6d292323bf145 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 3 Feb 2022 08:53:27 +0100 Subject: [PATCH] Little fix for IO --- src/polyid.c | 2 +- src/rwbinpoly.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/polyid.c b/src/polyid.c index fa9a3fd..478bb57 100644 --- a/src/polyid.c +++ b/src/polyid.c @@ -11,7 +11,7 @@ #include "defaults.h" /* getopt options */ -const char *optstr = "dqu:p:P:W0"; +const char *optstr = "dqu:p:P:W0i:"; /* allocate polygons as a global array */ polygon *poly_global[NPOLYSMAX]; diff --git a/src/rwbinpoly.c b/src/rwbinpoly.c index e4302c0..50a67fb 100644 --- a/src/rwbinpoly.c +++ b/src/rwbinpoly.c @@ -167,6 +167,7 @@ int wr_bin_poly(char *filename, format *fmt, int npolys, polygon *polys[/*npolys fwrite(polys[ipoly]->rp, sizeof(vec), ph.np, file); fwrite(polys[ipoly]->cm, sizeof(long double), ph.np, file); } + npoly = npolys; /* warn about polygons with incorrect area */ if (nbadarea > 0) {