]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Fixed count overflow problem
authorJaroslav Kysela <perex@perex.cz>
Sat, 23 Feb 2002 09:28:47 +0000 (09:28 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sat, 23 Feb 2002 09:28:47 +0000 (09:28 +0000)
aplay/aplay.c

index c04b477148454c42ccb6f2b2023fa8b386709f2d..0bfc1b13fe0df301162fdada0f99747ec3f44b1b 100644 (file)
@@ -1756,6 +1756,8 @@ static void capture(char *name)
        fdcount = 0;
        count = calc_count();
        count += count % 2;
+       if (count == 0)
+               count -= 2;
        /* 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) */
        if (fmt_rec_table[file_type].start)