diff options
-rw-r--r-- | src/stdio/__printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/__printf.c b/src/stdio/__printf.c index ad266e2c..0429d5bf 100644 --- a/src/stdio/__printf.c +++ b/src/stdio/__printf.c @@ -51,7 +51,7 @@ static void __itos(char *s, intmax_t n, int flags, int precision, int base) extern int toupper(int); char digits[] = "0123456789abcdef"; char sign = n < 0 ? '-' : '+'; - char buf[NUMBUFLEN]; + char buf[NUMBUFLEN + 1]; char *out = buf + NUMBUFLEN; if (flags & UPPER && base > 10) { size_t i; |