From 3224b1a63999505c68b3d280a53d0c21b18f5817 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 13 May 2025 21:33:21 +0200
Subject: [PATCH] Fix typo in stats gathering in the tools.c reported by Mladen

---
 src/tools.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools.c b/src/tools.c
index 44c8fbdc39..f31a7409c7 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -133,7 +133,7 @@ void pairs_n2(double *dim, struct part *restrict parts, int N, int periodic) {
     // count += parts[k].icount;
     rho += parts[k].density.wcount;
     rho_min = fmin(parts[k].density.wcount, rho_min);
-    rho_min = fmax(parts[k].density.wcount, rho_max);
+    rho_max = fmax(parts[k].density.wcount, rho_max);
   }
 
   /* Dump the result. */
-- 
GitLab