From 23c0f215943788c10b623a8a742146917fb32250 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 20 Feb 2014 13:32:34 +0000 Subject: * libc/stdio/open_memstream.c (internal_open_memstream_r): Initialize c->pos to 0. --- newlib/ChangeLog | 5 +++++ newlib/libc/stdio/open_memstream.c | 1 + 2 files changed, 6 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a00d38dff..0116fd1fb 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2014-02-20 Corinna Vinschen + + * libc/stdio/open_memstream.c (internal_open_memstream_r): Initialize + c->pos to 0. + 2014-02-11 Joey Ye * libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols. 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; -- cgit v1.2.3