delay: avoid div by zero in delay_set_duration()
This commit is contained in:
parent
bcbce9e1fb
commit
847af03dc7
1 changed files with 3 additions and 1 deletions
4
delay.c
4
delay.c
|
@ -30,7 +30,9 @@ void delay_set_time(
|
|||
}
|
||||
|
||||
delay->duration = new_duration;
|
||||
delay->buf_idx %= new_duration;
|
||||
if( new_duration > 0 ) {
|
||||
delay->buf_idx %= new_duration;
|
||||
}
|
||||
}
|
||||
|
||||
void delay_process(
|
||||
|
|
Loading…
Reference in a new issue