Close the file list before opening the container that holds the

totals, otherwise we end up emitting invalid JSON -- provided
libxo does not prevent us from doing that.

PR:		197499
Submitted by:	allanjude@
This commit is contained in:
Marcel Moolenaar 2015-02-11 17:56:24 +00:00
parent ec6c61d896
commit 399d34850f

View File

@ -140,12 +140,14 @@ main(int argc, char *argv[])
} while(*++argv);
}
xo_close_list("file");
if (total > 1) {
xo_open_container("total");
show_cnt("total", tlinect, twordct, tcharct, tlongline);
xo_close_container("total");
}
xo_close_list("file");
xo_close_container("wc");
xo_finish();
exit(errors == 0 ? 0 : 1);