changeset 241:66ebf1399a29

Fix bug in xtract_peak()
author Jamie Bullock <jamie@jamiebullock.com>
date Thu, 05 Jun 2014 20:30:08 +0100
parents a1c83801f973
children d2453f55c470
files src/scalar.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/scalar.c	Thu Jun 05 20:29:46 2014 +0100
+++ b/src/scalar.c	Thu Jun 05 20:30:08 2014 +0100
@@ -1037,7 +1037,7 @@
     }
     
     average /= (double)N;
-    
+        
     if (current != maximum)
     {
         return XTRACT_NO_RESULT;
@@ -1048,6 +1048,8 @@
         return XTRACT_NO_RESULT;
     }
     
+    *result = current;
+    
     return XTRACT_SUCCESS;
     
 }