projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove inclusion guard hacks for sys/kd.h
[musl]
/
src
/
stdio
/
vfwscanf.c
diff --git
a/src/stdio/vfwscanf.c
b/src/stdio/vfwscanf.c
index
1ebc5ce
..
a7cd092
100644
(file)
--- a/
src/stdio/vfwscanf.c
+++ b/
src/stdio/vfwscanf.c
@@
-117,8
+117,12
@@
int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
continue;
}
if (*p != '%' || p[1] == '%') {
continue;
}
if (*p != '%' || p[1] == '%') {
- p += *p=='%';
- c = getwc(f);
+ if (*p == '%') {
+ p++;
+ while (iswspace((c=getwc(f)))) pos++;
+ } else {
+ c = getwc(f);
+ }
if (c!=*p) {
ungetwc(c, f);
if (c<0) goto input_fail;
if (c!=*p) {
ungetwc(c, f);
if (c<0) goto input_fail;