aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/printf.c')
-rw-r--r--lib/libc/printf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/printf.c b/lib/libc/printf.c
index 2715a72d4..45e153ec7 100644
--- a/lib/libc/printf.c
+++ b/lib/libc/printf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -108,6 +108,9 @@ int vprintf(const char *fmt, va_list args)
/* Check the format specifier */
loop:
switch (*fmt) {
+ case '%':
+ (void)putchar('%');
+ break;
case 'i': /* Fall through to next one */
case 'd':
num = get_num_va_args(args, l_count);