Fix off by one (bug #2872, but different solution)
authorMark Spencer <markster@digium.com>
Wed, 10 Nov 2004 20:20:18 +0000 (20:20 +0000)
committerMark Spencer <markster@digium.com>
Wed, 10 Nov 2004 20:20:18 +0000 (20:20 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4198 65c4cc65-6c06-0410-ace0-fbb531ad65f3

dsp.c

diff --git a/dsp.c b/dsp.c
index e637aa6..a906119 100755 (executable)
--- a/dsp.c
+++ b/dsp.c
@@ -1606,7 +1606,7 @@ static void ast_dsp_prog_reset(struct ast_dsp *dsp)
        for (x=0;x<sizeof(modes[dsp->progmode].freqs) / sizeof(modes[dsp->progmode].freqs[0]);x++) {
                if (modes[dsp->progmode].freqs[x]) {
                        goertzel_init(&dsp->freqs[x], (float)modes[dsp->progmode].freqs[x], dsp->gsamp_size);
-                       max = x;
+                       max = x + 1;
                }
        }
        dsp->freqcount = max;