changeset 211:4035c19073aa

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:18:16 +0000
parents b81101e50fc6
children 7f3266e247d6
files src/cs/services/etm/etm_audio.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/services/etm/etm_audio.c	Sat Oct 24 17:46:26 2020 +0000
+++ b/src/cs/services/etm/etm_audio.c	Mon Oct 31 00:18:16 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;