about summary refs log tree commit diff
path: root/src/stdio/__stdio_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/__stdio_write.c')
-rw-r--r--src/stdio/__stdio_write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdio/__stdio_write.c b/src/stdio/__stdio_write.c
index dd97cf68..da45673f 100644
--- a/src/stdio/__stdio_write.c
+++ b/src/stdio/__stdio_write.c
@@ -22,6 +22,7 @@ size_t __stdio_write(FILE *f, const unsigned char *buf, size_t len)
 		cnt = syscall_cp(SYS_writev, f->fd, iov, iovcnt);
 		pthread_cleanup_pop(0);
 		if (cnt == rem) {
+			f->wend = f->buf + f->buf_size;
 			f->wpos = f->wbase = f->buf;
 			return len;
 		}