Skip to content
Permalink
Browse files

prf.c: don't be silent with unknown conversion specifiers

Mimic the glibc behavior when encountering an unknown conversion
specifier rather than silently skipping it.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
  • Loading branch information...
Nicolas Pitre authored and nashif committed Jun 20, 2019
1 parent ab59209 commit 4ad2a8f99042e2c06a36baf3ee4e209e5749b558
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/libc/minimal/source/stdout/prf.c
@@ -737,6 +737,12 @@ int z_prf(int (*func)(), void *dest, const char *format, va_list vargs)
count++;
break;

default:
PUTC('%');
PUTC(c);
count += 2;
break;

case 0:
return count;
}

0 comments on commit 4ad2a8f

Please sign in to comment.
You can’t perform that action at this time.