summaryrefslogtreecommitdiff
path: root/lib/libc/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/printf.c')
-rw-r--r--lib/libc/printf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/printf.c b/lib/libc/printf.c
index e52cbed73..faccfdff4 100644
--- a/lib/libc/printf.c
+++ b/lib/libc/printf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2021, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2023, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -81,6 +81,7 @@ static int unsigned_num_print(unsigned long long int unum, unsigned int radix,
* %x - hexadecimal format
* %s - string format
* %d or %i - signed decimal format
+ * %c - character format
* %u - unsigned decimal format
* %p - pointer format
*
@@ -130,6 +131,10 @@ loop:
count += unsigned_num_print(unum, 10,
padc, padn);
break;
+ case 'c':
+ (void)putchar(va_arg(args, int));
+ count++;
+ break;
case 's':
str = va_arg(args, char *);
count += string_print(str);