diff --git a/src/algs/slsqp/slsqp.c b/src/algs/slsqp/slsqp.c index e6360624..2d9763eb 100644 --- a/src/algs/slsqp/slsqp.c +++ b/src/algs/slsqp/slsqp.c @@ -2459,7 +2459,7 @@ nlopt_result nlopt_slsqp(unsigned n, nlopt_func f, void *f_data, unsigned max_cdim; int want_grad = 1; - if (p > n) { + if (ptot > n) { nlopt_stop_msg(stop, "slsqp: more equality constraints than variables"); return NLOPT_INVALID_ARGS; }