diff dsp/signalconditioning/FiltFilt.cpp @ 507:d7b9691817a3

Fix a further overrun that caused the wrong input to be provided to sub-filters!
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 05 Jun 2019 16:02:20 +0100
parents 285f18c0992a
children 855d862cf02b
line wrap: on
line diff
--- a/dsp/signalconditioning/FiltFilt.cpp	Wed Jun 05 15:50:38 2019 +0100
+++ b/dsp/signalconditioning/FiltFilt.cpp	Wed Jun 05 16:02:20 2019 +0100
@@ -58,7 +58,7 @@
     }
     index = 0;
     for (i = 0; i < nFact; i++) {
-        if (i < length) {
+        if (i + 1 < length) {
             filtScratchIn[(nExt - nFact) + index] =
                 sampleN - src[ (length - 2) - i ];
         }