changeset 84:7c8edb20f740

Fixed bug in xtract_irregularity_k() - failure to initialise *result to zero
author Dan Stowell <danstowell@gmail.com>
date Sun, 02 Sep 2007 14:28:00 +0000
parents 5fadbacdb2a7
children 89b516adb5df
files src/scalar.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/scalar.c	Mon Aug 20 08:12:04 2007 +0000
+++ b/src/scalar.c	Sun Sep 02 14:28:00 2007 +0000
@@ -231,7 +231,9 @@
 
     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);