From: Dirk Eddelbuettel <edd@debian.org>
Date: Mon, 1 Jun 2026 19:49:06 +0800
Subject: The n_tries parameter has to be positive

Bug-Debian: https://bugs.debian.org/1086206
Bug: https://lists.gnu.org/archive/html/bug-gsl/2024-09/msg00000.html
Last-Update: 2024-10-28
---
 siman/siman.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/siman/siman.c b/siman/siman.c
index 65b9177..5e8d75d 100644
--- a/siman/siman.c
+++ b/siman/siman.c
@@ -197,6 +197,9 @@ gsl_siman_solve_many (const gsl_rng * r, void *x0_p, gsl_siman_Efunc_t Ef,
   double u;                     /* throw the die to choose a new "x" */
   int n_iter;
 
+  /* this function requires that n_tries be positive */
+  assert(params.n_tries > 0);
+
   if (print_position) {
     printf ("#-iter    temperature       position");
     printf ("         delta_pos        energy\n");
