about summary refs log tree commit diff
path: root/libio/iosetbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iosetbuffer.c')
-rw-r--r--libio/iosetbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index d119cd0032..5acbf5e812 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -38,7 +38,7 @@ _IO_setbuffer (fp, buf, size)
   if (!buf)
     size = 0;
   (void) _IO_SETBUF (fp, buf, size);
-  if (fp->_mode == 0)
+  if (fp->_vtable_offset == 0 && fp->_mode == 0)
     /* We also have to set the buffer using the wide char function.  */
     (*fp->_wide_data->_wide_vtable->__setbuf) (fp, buf, size);
   _IO_funlockfile (fp);