summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/stdio/open_memstream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c
index e33063b7c..5de99474d 100644
--- a/newlib/libc/stdio/open_memstream.c
+++ b/newlib/libc/stdio/open_memstream.c
@@ -355,6 +355,7 @@ _DEFUN(internal_open_memstream_r, (ptr, buf, size, wide),
c->storage = c;
c->pbuf = buf;
c->psize = size;
+ c->pos = 0;
c->eof = 0;
c->saved.w = L'\0';
c->wide = (int8_t) wide;