summaryrefslogtreecommitdiff
path: root/src/stdio/vfwscanf.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-07-02 12:09:48 -0400
committerRich Felker <dalias@aerifal.cx>2014-07-02 12:09:48 -0400
commit984c25b74da085c6ae6b44a87bbd5f8afc9be331 (patch)
tree031b96d453896bbdddb9b8a95b2a65b681822295 /src/stdio/vfwscanf.c
parent285f969db6a41a547ba5192a7363d41d4a8b5e3b (diff)
downloadmusl-984c25b74da085c6ae6b44a87bbd5f8afc9be331.tar.gz
fix failure of wide printf/scanf functions to set wide orientation
in some cases, these functions internally call a byte-based input or output function before calling getwc/putwc, so they cannot rely on the latter to set the orientation.
Diffstat (limited to 'src/stdio/vfwscanf.c')
-rw-r--r--src/stdio/vfwscanf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c
index f8f4b70f..ac5c2c24 100644
--- a/src/stdio/vfwscanf.c
+++ b/src/stdio/vfwscanf.c
@@ -104,6 +104,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
FLOCK(f);
+ f->mode |= f->mode+1;
+
for (p=fmt; *p; p++) {
alloc = 0;