diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-02-14 16:19:34 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-05-07 09:41:09 +1000 |
commit | d903d17d7f006fa333265b8476063b189c20d082 (patch) | |
tree | 891b7ac5a62518d466aaa4626548b19d5941d7a0 /os/log.c | |
parent | 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf (diff) |
os: support %c in pnprintf
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os/log.c')
-rw-r--r-- | os/log.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -450,6 +450,13 @@ pnprintf(char *string, size_t size, const char *f, va_list args) string[s_idx++] = number[i]; } break; + case 'c': + { + char c = va_arg(args, int); + if (s_idx < size - 1) + string[s_idx++] = c; + } + break; case '%': string[s_idx++] = '%'; break; |