libc: break from scanf on failed non-whitespace match

This commit is contained in:
K. Lange 2018-12-19 14:53:32 +09:00
parent 92a17c3e9e
commit 0d8a512308
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,8 @@ int vsscanf(const char *str, const char *format, va_list ap) {
/* Expect exact character? */
if (*str == *format) {
str++;
} else {
break;
}
}
format++;