From 0f1d8e964f60a8a76c238fa5962cc5936fdccdc3 Mon Sep 17 00:00:00 2001 From: Davis King Date: Mon, 6 Jun 2022 22:01:59 -0400 Subject: [PATCH] Fix assert having wrong condition --- tools/python/src/global_optimization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/src/global_optimization.cpp b/tools/python/src/global_optimization.cpp index 88180b0bd..501199367 100644 --- a/tools/python/src/global_optimization.cpp +++ b/tools/python/src/global_optimization.cpp @@ -60,7 +60,7 @@ double call_func(py::object f, const matrix& args) const auto num = num_function_arguments(f, args.size()); DLIB_CASSERT(num == args.size(), "The function being optimized takes a number of arguments that doesn't agree with the size of the bounds lists you provided to find_max_global()"); - DLIB_CASSERT(0 < num && num < 35, "Functions being optimized must take between 1 and 35 scalar arguments."); + DLIB_CASSERT(0 < num && num <= 35, "Functions being optimized must take between 1 and 35 scalar arguments."); #define CALL_WITH_N_ARGS(N) case N: return dlib::gopt_impl::_cwv(f,args,typename make_compile_time_integer_range::type()).cast(); switch (num)