diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/vsprintf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 44e431fb..ba0bc85a 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -275,6 +275,11 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) *str = ' '; ++str; } + if(flags & STP_ZEROPAD) { + if (str <= end) + *str = '\0'; + ++str; + } continue; case 'X': |