From bc2d8fd824bded7091065adf4cbb74fd469e9045 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Tue, 3 Sep 2024 10:37:44 +0100
Subject: [PATCH] MNT: Safeguard against being passed a bad value for nthr

---
 splinterpolator.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/splinterpolator.h b/splinterpolator.h
index 094a0aa..3936189 100644
--- a/splinterpolator.h
+++ b/splinterpolator.h
@@ -1506,7 +1506,7 @@ void Splinterpolator<T>::deconv_along(unsigned int dim)
     ss *= _dim[i];
   }
 
-  if (_nthr==1) { // If we are to run single-threaded
+  if (_nthr<=1) { // If we are to run single-threaded
     SplineColumn  col(mdim,mstep);          // Column helps us do the job
     for (unsigned int l=0; l<rdim[3]; l++) {
       for (unsigned int k=0; k<rdim[2]; k++) {
-- 
GitLab