X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fvfwscanf.c;h=223aad4f351c96bb2a2ca9f9e3e75b798546ac75;hb=33ce920857405d4f4b342c85b74588a15e2702e5;hp=44fac78e0f069086ab3ebcaaccd3eb8db6a80b6e;hpb=1d92cddb1e1ed4b6cc0e55461727561e7a2522e0;p=musl diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c index 44fac78e..223aad4f 100644 --- a/src/stdio/vfwscanf.c +++ b/src/stdio/vfwscanf.c @@ -6,9 +6,6 @@ #include #include #include -#include -#include -#include #include "stdio_impl.h" #include "shgetc.h" @@ -107,6 +104,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) FLOCK(f); + fwide(f, 1); + for (p=fmt; *p; p++) { alloc = 0; @@ -143,6 +142,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) } if (*p=='m') { + wcs = 0; + s = 0; alloc = !!dest; p++; } else {