diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-10-06 00:03:43 +0200 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-10-06 00:03:43 +0200 |
commit | a9cefceaf856df82c6867e853a357b0298d566ce (patch) | |
tree | 27f7d6af79a21bc69f88ccd3bbc5f2e4cd88e653 | |
parent | c201ca5d3825f932ba66fab3f029e3eec2cdf3b3 (diff) | |
download | libgha-a9cefceaf856df82c6867e853a357b0298d566ce.tar.gz |
[bugfix] do not call residual cb in case of unsuccessful multidimensional optimization result
-rw-r--r-- | src/gha.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -400,7 +400,7 @@ void gha_extract_many_simple(FLOAT* pcm, struct gha_info* info, size_t k, gha_ct int gha_adjust_info(const FLOAT* pcm, struct gha_info* info, size_t k, gha_ctx_t ctx, resuidal_cb_t cb, void* user_ctx) { int rv = gha_adjust_info_newton_md(pcm, info, k, ctx); - if (cb) + if (cb && rv != -1) cb(ctx->tmp_buf, ctx->size, user_ctx); return rv; |