# HG changeset patch # User reimar # Date 1141822851 0 # Node ID 30fa0638b78dff03fb025697ad9a8741635ff6c3 # Parent 1783a290fdf49a4d47f195aa78e0e4a6c423aaa0 We start with 0, so ch (channel number) == AF_NCH is invalid, too (not just >) diff -r 1783a290fdf4 -r 30fa0638b78d libaf/af_equalizer.c --- 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 ; karg; 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