Fixed count overflow problem

This commit is contained in:
Jaroslav Kysela 2002-02-23 09:28:47 +00:00
parent 5524873f8d
commit 3fc76a4e6d

View file

@ -1756,6 +1756,8 @@ static void capture(char *name)
fdcount = 0; fdcount = 0;
count = calc_count(); count = calc_count();
count += count % 2; count += count % 2;
if (count == 0)
count -= 2;
/* WAVE-file should be even (I'm not sure), but wasting one byte /* WAVE-file should be even (I'm not sure), but wasting one byte
isn't a problem (this can only be in 8 bit mono) */ isn't a problem (this can only be in 8 bit mono) */
if (fmt_rec_table[file_type].start) if (fmt_rec_table[file_type].start)