From 7de35515d90d364e851cdde712062b942d6bf36a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Jan 2026 09:10:38 +0100 Subject: [PATCH] mprintf: drop old sprintf fallback 1. No modern systems lack snprintf() 2. If there actually exist any such systems, they get to manage without floating point output. Closes #20218 --- lib/mprintf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mprintf.c b/lib/mprintf.c index 50ede212a4..85aedf4992 100644 --- a/lib/mprintf.c +++ b/lib/mprintf.c @@ -712,7 +712,8 @@ static bool out_double(void *userp, work[BUFFSIZE - 1] = 0; #endif #else - (sprintf)(work, formatbuf, dnum); + /* float and double outputs do not work without snprintf support */ + work[0] = 0; #endif #ifdef __clang__ #pragma clang diagnostic pop