Skip to content

Commit

Permalink
Fix numevals copy if elimdim_wrapcheck
Browse files Browse the repository at this point in the history
Closes #419
  • Loading branch information
jschueller committed Oct 7, 2021
1 parent d676b27 commit 809a50a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,8 @@ nlopt_result NLOPT_STDCALL nlopt_optimize(nlopt_opt opt, double *x, double *opt_
ret = nlopt_optimize_(elim_opt, x, opt_f);

if (elim_opt != opt) {
opt->numevals = elim_opt->numevals;
opt->errmsg = elim_opt->errmsg; elim_opt->errmsg = NULL;
elimdim_destroy(elim_opt);
elimdim_expand(opt->n, x, opt->lb, opt->ub);
opt->force_stop_child = NULL;
Expand Down

0 comments on commit 809a50a

Please sign in to comment.