diff src/cs/services/etm/etm_audio.c @ 702:9394305d4ff5 default tip

etm_audio.c: fix off-by-one error in auw of FIR coefficients This fix was already made in FC Tourmaline a while back, but it is also the kind of bugfix that deserves to be backported to Magnetite and Selenite as well.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 00:14:44 +0000
parents 945cf7f506b2
children
line wrap: on
line diff
--- a/src/cs/services/etm/etm_audio.c	Sat Mar 26 19:51:34 2022 +0000
+++ b/src/cs/services/etm/etm_audio.c	Mon Oct 31 00:14:44 2022 +0000
@@ -224,7 +224,7 @@
 
         parameter = etm_malloc (sizeof(T_AUDIO_FIR_COEF));
         // Write coeffient values
-        for (i=0; i <= (sizeof(T_AUDIO_FIR_COEF)/2); i++) {
+        for (i=0; i < (sizeof(T_AUDIO_FIR_COEF)/2); i++) {
             ((T_AUDIO_FIR_COEF *) parameter)->coefficient[i]  = etm_get16(buf);  buf += 2;
         }
         audio.data = parameter;