diff options
Diffstat (limited to 'libio/wgenops.c')
-rw-r--r-- | libio/wgenops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/wgenops.c b/libio/wgenops.c index f822c8d..242f3a0 100644 --- a/libio/wgenops.c +++ b/libio/wgenops.c @@ -272,6 +272,8 @@ __wunderflow (fp) if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1)) return WEOF; + if (fp->_mode == 0) + _IO_fwide (fp, 1); if (_IO_in_put_mode (fp)) if (_IO_switch_to_wget_mode (fp) == EOF) return WEOF; |