Skip to content

Commit

Permalink
Divide by zero fix by James Caldwell
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 30, 2001
1 parent 786ea63 commit 915d126
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions timidity/mix.c
Expand Up @@ -432,6 +432,9 @@ static void ramp_out(sample_t *sp, int32 *lp, int v, int32 c)

sample_t s=0; /* silly warning about uninitialized s */

/* Fix by James Caldwell */
if ( c == 0 ) c = 1;

left=voice[v].left_mix;
li=-(left/c);
if (!li) li=-1;
Expand Down

0 comments on commit 915d126

Please sign in to comment.