arecordmidi: simple coverity fix

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-03-12 16:06:03 +01:00
parent cf2cc37502
commit 6dc4b1eab5

View file

@ -631,7 +631,7 @@ static void write_file(void)
fwrite("MThd\0\0\0\6", 1, 8, file);
/* type 0 or 1 */
fputc(0, file);
fputc(used_tracks > 1, file);
fputc(used_tracks > 1 ? 1 : 0, file);
/* number of tracks */
fputc((used_tracks >> 8) & 0xff, file);
fputc(used_tracks & 0xff, file);