diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-07 16:40:02 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-08 11:43:23 -0600 |
commit | ff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch) | |
tree | dcfe4bc52848a5637c975a3352b57885e5b8a06d /lib/tiny-printf.c | |
parent | 34820924edbc4ec7803eb89d9852f4b870fa760a (diff) | |
parent | f892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff) |
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
Diffstat (limited to 'lib/tiny-printf.c')
-rw-r--r-- | lib/tiny-printf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 0503c17341f..faf55d7f327 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -211,6 +211,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) bool lz = false; int width = 0; bool islong = false; + bool force_char = false; ch = *(fmt++); if (ch == '-') @@ -300,6 +301,8 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) break; case 'c': out(info, (char)(va_arg(va, int))); + /* For the case when it's \0 char */ + force_char = true; break; case 's': p = va_arg(va, char*); @@ -317,8 +320,10 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) while (width-- > 0) info->putc(info, lz ? '0' : ' '); if (p) { - while ((ch = *p++)) + while ((ch = *p++) || force_char) { info->putc(info, ch); + force_char = false; + } } } } |