aboutsummaryrefslogtreecommitdiff
path: root/libio/iogetwline.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iogetwline.c')
-rw-r--r--libio/iogetwline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/iogetwline.c b/libio/iogetwline.c
index 2d9eca0edc..2559cd8eb6 100644
--- a/libio/iogetwline.c
+++ b/libio/iogetwline.c
@@ -64,6 +64,8 @@ _IO_getwline_info (fp, buf, n, delim, extract_delim, eof)
wchar_t *ptr = buf;
if (eof != NULL)
*eof = 0;
+ if (__builtin_expect (fp->_mode, 1) == 0)
+ _IO_fwide (fp, 1);
while (n != 0)
{
_IO_ssize_t len = (fp->_wide_data->_IO_read_end