diff --git a/libc/src/scanf.cpp b/libc/src/scanf.cpp index 1a7d3f72..777096e1 100644 --- a/libc/src/scanf.cpp +++ b/libc/src/scanf.cpp @@ -72,7 +72,11 @@ extern "C" else { format++; - if (*format == '%') goto normal; + if (*format == '%') + { + str += strspn(str, " \t\f\r\n\v"); + goto normal; + } int flags = parse_flags(&format); size_t width = parse_width(&format, flags);