diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-01-02 19:28:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-01-02 19:28:55 +0000 |
commit | 720981169b1939283e906c85eada83415e7944a0 (patch) | |
tree | 3e7b9a242dcf719fefb9f2fa8caa48e97fe02b1a /wcsmbs | |
parent | 623d0bf5040ea9bb783bbc6fbace8680b52533b0 (diff) | |
download | glibc-720981169b1939283e906c85eada83415e7944a0.tar glibc-720981169b1939283e906c85eada83415e7944a0.tar.gz glibc-720981169b1939283e906c85eada83415e7944a0.tar.bz2 glibc-720981169b1939283e906c85eada83415e7944a0.zip |
* wcsmbs/wcsnrtombs.c (__wcsnrtombs): Create temporary state objectcvs/fedora-glibc-20090102T2110cvs/fedora-glibc-20090102T2040
if no output is written.
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/wcsnrtombs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c index 171fc3c227..eead26fb3c 100644 --- a/wcsmbs/wcsnrtombs.c +++ b/wcsmbs/wcsnrtombs.c @@ -77,10 +77,14 @@ __wcsnrtombs (dst, src, nwc, len, ps) /* We have to handle DST == NULL special. */ if (dst == NULL) { + mbstate_t temp_state; unsigned char buf[256]; /* Just an arbitrary value. */ const unsigned char *inbuf = (const unsigned char *) *src; size_t dummy; + temp_state = *data.__statep; + data.__statep = &temp_state; + result = 0; data.__outbufend = buf + sizeof (buf); |