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>
This commit is contained in:
parent
ab59209ea6
commit
4ad2a8f990
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue