chiark / gitweb /
bug fix in nlopt_set_lower_bounds1, thanks to @wojdyr
authorSteven G. Johnson <stevenj@alum.mit.edu>
Tue, 26 May 2015 15:00:46 +0000 (11:00 -0400)
committerSteven G. Johnson <stevenj@alum.mit.edu>
Tue, 26 May 2015 15:00:46 +0000 (11:00 -0400)
api/options.c

index b2ce5febb55fc73a7214c67a2f530c07047d11f9..626a38b8c04323f69ed2be1020a236a7587b3a68 100644 (file)
@@ -287,8 +287,8 @@ NLOPT_STDCALL nlopt_set_lower_bounds1(nlopt_opt opt, double lb)
      nlopt_unset_errmsg(opt);
      if (opt) {
          unsigned i;
-         for (i = 0; i < opt->n; ++i)
-              opt->lb[i] = lb; {
+         for (i = 0; i < opt->n; ++i) {
+              opt->lb[i] = lb;
               if (opt->lb[i] < opt->ub[i] && nlopt_istiny(opt->ub[i] - opt->lb[i]))
                   opt->lb[i] = opt->ub[i];
           }