From 8d62c2438cd09ef70525138bdab4cd931750678a Mon Sep 17 00:00:00 2001 From: Thomas Mannfred Carlsson Date: Fri, 6 Feb 2026 22:52:21 +0200 Subject: [PATCH] Avoid integer truncation in stats --- src/hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hash.c b/src/hash.c index 255cd5a1..5df32550 100644 --- a/src/hash.c +++ b/src/hash.c @@ -617,7 +617,9 @@ output_hash(struct Client *source_p, const char *name, unsigned long length, uns { sendto_one_numeric(source_p, RPL_STATSDEBUG, "B :Average depth: %.3f%%/%.3f%% Highest depth: %lu", - (float) (total / (length - counts[0])), (float) (total / length), deepest); + (float) total / (float) (length - counts[0]), + (float) total / (float) length, + deepest); } for(unsigned long i = 1; i < IRCD_MIN(11, deepest + 1); i++)