From 80bd2eaafa79c268b5339e6161c9d58d7553c745 Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Sat, 24 Sep 2016 22:39:52 -0400 Subject: [PATCH] Fix -nx option -nx was trying to put "x"+1, instead of "x", items per line --- miditones.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miditones.c b/miditones.c index bd9405a..b870fb9 100644 --- a/miditones.c +++ b/miditones.c @@ -354,7 +354,7 @@ uint8_t *buffer, *hdrptr; unsigned long buflen; int num_tracks; int tracks_done = 0; -int outfile_maxitems = 25; +int outfile_maxitems = 26; int outfile_itemcount = 0; int num_tonegens = DEFAULT_TONEGENS; int num_tonegens_used = 0; @@ -703,7 +703,7 @@ and generate a newline every so often. */ void outfile_items (int n) { outfile_bytecount += n; outfile_itemcount += n; - if (!binaryoutput && outfile_itemcount > outfile_maxitems) { + if (!binaryoutput && outfile_itemcount >= outfile_maxitems) { fprintf (outfile, "\n"); outfile_itemcount = 0; }