summaryrefslogtreecommitdiff
path: root/src/stdio/fgetwc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fgetwc.c')
-rw-r--r--src/stdio/fgetwc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/fgetwc.c b/src/stdio/fgetwc.c
index 8626d54c..b261b44f 100644
--- a/src/stdio/fgetwc.c
+++ b/src/stdio/fgetwc.c
@@ -10,7 +10,7 @@ wint_t __fgetwc_unlocked(FILE *f)
unsigned char b;
size_t l;
- f->mode |= f->mode+1;
+ if (f->mode <= 0) fwide(f, 1);
/* Convert character from buffer if possible */
if (f->rpos < f->rend) {