delay: avoid div by zero in delay_set_duration()

This commit is contained in:
Michael Sippel 2024-12-08 19:35:58 +01:00
parent bcbce9e1fb
commit 847af03dc7
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -30,8 +30,10 @@ void delay_set_time(
}
delay->duration = new_duration;
if( new_duration > 0 ) {
delay->buf_idx %= new_duration;
}
}
void delay_process(
struct delay * delay,