From a83a549de5e831258fccbc251b3fb5ac5d3ced7a Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sun, 5 Oct 2025 21:02:27 +0100 Subject: [PATCH] Correct the value size in the debug statement, otherwise it overflows on 32-bits systems. --- src/pv/number.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pv/number.c b/src/pv/number.c index f24925b..e827421 100644 --- a/src/pv/number.c +++ b/src/pv/number.c @@ -160,7 +160,7 @@ off_t pv_getnum_size(const char *str, bool decimal_units) fractional_part = fractional_part / fractional_divisor; integral_part += fractional_part; - debug("%s [%s] = %ld", str, decimal_units ? "decimal" : "binary", integral_part); + debug("%s [%s] = %lld", str, decimal_units ? "decimal" : "binary", (long long) integral_part); return integral_part; }