From d24171ed01e826815ed5655ba722cc5207c35599 Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Sat, 24 Sep 2016 23:38:03 -0400 Subject: [PATCH] Include header and terminator in score byte count --- miditones.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/miditones.c b/miditones.c index d291166..69111be 100644 --- a/miditones.c +++ b/miditones.c @@ -1094,11 +1094,13 @@ int main (int argc, char *argv[]) { fflush (outfile); file_header_num_tgens_position = ftell (outfile); // remember where the number of tone generators is fprintf (outfile, "%2d, // (Playtune file header)\n", file_header.num_tgens); + outfile_bytecount += 6; } } else if (do_header) { // write the binary file header for (int i = 0; i < sizeof (file_header); ++i) fputc (((unsigned char *) &file_header)[i], outfile); file_header_num_tgens_position = (char *) &file_header.num_tgens - (char *) &file_header; + outfile_bytecount += sizeof (file_header); } } @@ -1339,6 +1341,7 @@ This is not unlike multiway merging used for tape sorting algoritms in the 50's! while (tracks_done < num_tracks); // generate the end-of-score command and some commentary + outfile_bytecount++; if (binaryoutput) putc (CMD_STOP, outfile); else {