diff options
author | Jamie Bullock <jamie@jamiebullock.com> | 2014-06-05 20:30:08 +0100 |
---|---|---|
committer | Jamie Bullock <jamie@jamiebullock.com> | 2014-06-05 20:30:08 +0100 |
commit | 1691427529bbe02155b47b2c36b4b5ea8fb0bc87 (patch) | |
tree | a7ecc3847853bbff6f7f2310f883582b2a5a386a /src/scalar.c | |
parent | 4ccf4a2a0c6bd386d1d35fc080138f5d1b39a749 (diff) | |
download | LibXtract-1691427529bbe02155b47b2c36b4b5ea8fb0bc87.tar.gz LibXtract-1691427529bbe02155b47b2c36b4b5ea8fb0bc87.tar.bz2 LibXtract-1691427529bbe02155b47b2c36b4b5ea8fb0bc87.zip |
Fix bug in xtract_peak()
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 86f3adc..7b0db80 100644 --- a/src/scalar.c +++ b/src/scalar.c @@ -1037,7 +1037,7 @@ int xtract_peak(const double *data, const int N, const void *argv, double *resul } average /= (double)N; - + if (current != maximum) { return XTRACT_NO_RESULT; @@ -1048,6 +1048,8 @@ int xtract_peak(const double *data, const int N, const void *argv, double *resul return XTRACT_NO_RESULT; } + *result = current; + return XTRACT_SUCCESS; } |