summaryrefslogtreecommitdiff
path: root/os/log.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-02-14 16:19:34 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-07 09:41:09 +1000
commitd903d17d7f006fa333265b8476063b189c20d082 (patch)
tree891b7ac5a62518d466aaa4626548b19d5941d7a0 /os/log.c
parent58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf (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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/os/log.c b/os/log.c
index e4e9e8b9d..9f95743b5 100644
--- a/os/log.c
+++ b/os/log.c
@@ -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;