From 7c2f0a68637920998be89af10715751cd638076a Mon Sep 17 00:00:00 2001 From: stevenj Date: Wed, 18 Nov 2009 00:57:31 -0500 Subject: [PATCH] make sure minf is initialized to HUGE_VAL before calling any optimization routine darcs-hash:20091118055731-c8de0-e3ad0a0f08aa9c4eadca0572f9b43dae7131ce85.gz --- api/nlopt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/nlopt.c b/api/nlopt.c index 7255455..46170f6 100644 --- a/api/nlopt.c +++ b/api/nlopt.c @@ -304,6 +304,8 @@ static nlopt_result nlopt_minimize_( if (p != 0 && !AUGLAG_ALG(algorithm) && algorithm != NLOPT_GN_ISRES) return NLOPT_INVALID_ARGS; + *minf = HUGE_VAL; + d.f = f; d.f_data = f_data; d.lb = lb; -- 2.30.2