From ff80e419ed5ce6291eefa90dc01b22939d15b0d0 Mon Sep 17 00:00:00 2001 From: Dan Stowell Date: Sun, 2 Sep 2007 14:28:00 +0000 Subject: Fixed bug in xtract_irregularity_k() - failure to initialise *result to zero --- src/scalar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/scalar.c') 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); -- cgit v1.2.3