diff options
Diffstat (limited to 'libio/wfileops.c')
-rw-r--r-- | libio/wfileops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c index fb9d45b..b59a988 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -412,7 +412,8 @@ _IO_wfile_overflow (FILE *f, wint_t wch) return WEOF; } /* If currently reading or no buffer allocated. */ - if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0) + if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0 + || f->_wide_data->_IO_write_base == NULL) { /* Allocate a buffer if needed. */ if (f->_wide_data->_IO_write_base == 0) |