diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2007-09-24 08:23:26 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2007-09-24 08:23:26 +0000 |
commit | 05c9f692e8a4139320b4f541e1654f7cd0fb44ec (patch) | |
tree | e8511d3139dbfb673a9f04116b8040fa7e9bc14f /src/scalar.c | |
parent | 1f22cd5a7ddd3030c0c47f0528f5b2068f6b5283 (diff) | |
download | LibXtract-05c9f692e8a4139320b4f541e1654f7cd0fb44ec.tar.gz LibXtract-05c9f692e8a4139320b4f541e1654f7cd0fb44ec.tar.bz2 LibXtract-05c9f692e8a4139320b4f541e1654f7cd0fb44ec.zip |
Made xtract_loudness() more permissive, so it doesn't crash if N > BARK_BANDS
Diffstat (limited to 'src/scalar.c')
-rw-r--r-- | src/scalar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scalar.c b/src/scalar.c index f259872..b573102 100644 --- a/src/scalar.c +++ b/src/scalar.c @@ -419,8 +419,10 @@ int xtract_loudness(const float *data, const int N, const void *argv, float *res int n = N, rv; - if(n > XTRACT_BARK_BANDS) + if(n > XTRACT_BARK_BANDS){ + n = XTRACT_BARK_BANDS; rv = XTRACT_BAD_VECTOR_SIZE; + } else rv = XTRACT_SUCCESS; |