diff --git a/dlib/optimization/optimization_line_search.h b/dlib/optimization/optimization_line_search.h index 7968e4d2c..3a4a4f280 100644 --- a/dlib/optimization/optimization_line_search.h +++ b/dlib/optimization/optimization_line_search.h @@ -512,7 +512,7 @@ namespace dlib unsigned long iter = 0; while (true) { - ++max_iter; + ++iter; const double val = f(alpha); if (val <= f0 + alpha*rho*d0 || iter >= max_iter) {