diff options
author | Dan Stowell <danstowell@gmail.com> | 2007-09-02 14:28:00 +0000 |
---|---|---|
committer | Dan Stowell <danstowell@gmail.com> | 2007-09-02 14:28:00 +0000 |
commit | ff80e419ed5ce6291eefa90dc01b22939d15b0d0 (patch) | |
tree | c2375c578f2ac7bba9e4bb961ce0a5cbd7875962 /src/scalar.c | |
parent | d57b2ba82498d427a36b8ed26e13b6c039a23cb6 (diff) | |
download | LibXtract-ff80e419ed5ce6291eefa90dc01b22939d15b0d0.tar.gz LibXtract-ff80e419ed5ce6291eefa90dc01b22939d15b0d0.tar.bz2 LibXtract-ff80e419ed5ce6291eefa90dc01b22939d15b0d0.zip |
Fixed bug in xtract_irregularity_k() - failure to initialise *result to zero
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 708c45c..ec22dd4 100644 --- a/src/scalar.c +++ b/src/scalar.c @@ -231,7 +231,9 @@ int xtract_irregularity_k(const float *data, const int N, const void *argv, floa int n, M = N - 1; - + + *result = 0.f; + for(n = 1; n < M; n++) *result += fabs(data[n] - (data[n-1] + data[n] + data[n+1]) / 3); |