diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-09 00:20:18 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-09 00:20:18 -0400 |
commit | 98af1005358ffb8331a815e67b3d6a78efd07d89 (patch) | |
tree | a3d1562698f4fdf6297381b142c5b5981a0eb0a9 /lib | |
parent | babd71c73c6e6868027d222a81ef499058f11794 (diff) |
usr: libc: Reset pad_width if used
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/src/stdio/vsnprintf.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |