From 98af1005358ffb8331a815e67b3d6a78efd07d89 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 9 Jun 2025 00:20:18 -0400 Subject: usr: libc: Reset pad_width if used Signed-off-by: Ian Moffett --- lib/libc/src/stdio/vsnprintf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libc/src/stdio/vsnprintf.c') diff --git a/lib/libc/src/stdio/vsnprintf.c b/lib/libc/src/stdio/vsnprintf.c index c122459..0e29600 100644 --- a/lib/libc/src/stdio/vsnprintf.c +++ b/lib/libc/src/stdio/vsnprintf.c @@ -96,6 +96,7 @@ vsnprintf(char *s, size_t size, const char *fmt, va_list ap) num_len = strlen(num_buf); for (size_t i = num_len; i < pad_width; ++i) printc(s, size, &off, '0'); + pad_width = 0; } printstr(s, size, &off, num_buf); break; -- cgit v1.2.3