changeset 17774:30fa0638b78d

We start with 0, so ch (channel number) == AF_NCH is invalid, too (not just >)
author reimar
date Wed, 08 Mar 2006 13:00:51 +0000
parents 1783a290fdf4
children 28c2108f1cfa
files libaf/af_equalizer.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/af_equalizer.c	Wed Mar 08 12:49:35 2006 +0000
+++ b/libaf/af_equalizer.c	Wed Mar 08 13:00:51 2006 +0000
@@ -125,7 +125,7 @@
     float* gain = ((af_control_ext_t*)arg)->arg;
     int    ch   = ((af_control_ext_t*)arg)->ch;
     int    k;
-    if(ch > AF_NCH || ch < 0)
+    if(ch >= AF_NCH || ch < 0)
       return AF_ERROR;
 
     for(k = 0 ; k<KM ; k++)
@@ -137,7 +137,7 @@
     float* gain = ((af_control_ext_t*)arg)->arg;
     int    ch   = ((af_control_ext_t*)arg)->ch;
     int    k;
-    if(ch > AF_NCH || ch < 0)
+    if(ch >= AF_NCH || ch < 0)
       return AF_ERROR;
 
     for(k = 0 ; k<KM ; k++)