about summary refs log tree commit diff
path: root/libio/wstrops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/wstrops.c')
-rw-r--r--libio/wstrops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libio/wstrops.c b/libio/wstrops.c
index 8e44f86c35..2aec314937 100644
--- a/libio/wstrops.c
+++ b/libio/wstrops.c
@@ -130,7 +130,10 @@ _IO_wstr_overflow (FILE *fp, wint_t c)
     *fp->_wide_data->_IO_write_ptr++ = c;
   if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_read_end)
     fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_write_ptr;
-  return c;
+  if (flush_only)
+    return 0;
+  else
+    return c;
 }