From be78a200b82d49abbe7248a0fdbc475c9570e0c3 Mon Sep 17 00:00:00 2001 From: Takano Akio Date: Thu, 11 Apr 2013 13:41:50 +0900 Subject: Fix off-by-one errors in gsl-aux.c The errors used to cause segfaults. --- lib/Numeric/GSL/gsl-aux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c index fc14ff5..61b6a54 100644 --- a/lib/Numeric/GSL/gsl-aux.c +++ b/lib/Numeric/GSL/gsl-aux.c @@ -937,7 +937,7 @@ int minimize(int method, double f(int, double*), double tolsize, int maxit, iter++; if (status) break; status = gsl_multimin_test_size (size, tolsize); - } while (status == GSL_CONTINUE && iter <= maxit); + } while (status == GSL_CONTINUE && iter < maxit); int i,j; for (i=iter; igradient, tolgrad); - } while (status == GSL_CONTINUE && iter <= maxit); + } while (status == GSL_CONTINUE && iter < maxit); int i,j; for (i=iter; if, epsabs); } - while (status == GSL_CONTINUE && iter <= maxit); + while (status == GSL_CONTINUE && iter < maxit); int i,j; for (i=iter; if, epsabs); } - while (status == GSL_CONTINUE && iter <= maxit); + while (status == GSL_CONTINUE && iter < maxit); int i,j; for (i=iter; idx, s->x, epsabs, epsrel); } - while (status == GSL_CONTINUE && iter <= maxit); + while (status == GSL_CONTINUE && iter < maxit); int i,j; for (i=iter; i