CID:1214189 Division or modulo by float zero

This commit is contained in:
Michael Jerris 2014-05-16 14:54:54 +00:00
parent 269db09015
commit 6b9024246f
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,10 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
int i;
float theta;
if (!sample_rate) {
sample_rate = 8000;
}
dtmf_detect_state->hit1 = dtmf_detect_state->hit2 = 0;
for (i = 0; i < GRID_FACTOR; i++) {