diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-01-02 21:14:11 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2009-01-02 21:14:11 +0000 |
commit | e3e60f6bdc80109e6cfbd092049a4bbb2f43c457 (patch) | |
tree | d166064d5e5bfd7821e133a5c76d8aae50d81766 /wcsmbs/mbsnrtowcs.c | |
parent | 033b8b2d4de5cd8abe4278cd2b30c50d7a78e886 (diff) | |
download | glibc-e3e60f6bdc80109e6cfbd092049a4bbb2f43c457.tar.gz glibc-e3e60f6bdc80109e6cfbd092049a4bbb2f43c457.tar.xz glibc-e3e60f6bdc80109e6cfbd092049a4bbb2f43c457.zip |
Updated to fedora-glibc-20090102T2110 cvs/fedora-glibc-2_9_90-1
Diffstat (limited to 'wcsmbs/mbsnrtowcs.c')
-rw-r--r-- | wcsmbs/mbsnrtowcs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wcsmbs/mbsnrtowcs.c b/wcsmbs/mbsnrtowcs.c index 8d0b9d3609..a5329a2331 100644 --- a/wcsmbs/mbsnrtowcs.c +++ b/wcsmbs/mbsnrtowcs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2000, 2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2002, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. @@ -79,9 +79,13 @@ __mbsnrtowcs (dst, src, nmc, len, ps) /* We have to handle DST == NULL special. */ if (dst == NULL) { + mbstate_t temp_state; wchar_t buf[64]; /* Just an arbitrary size. */ const unsigned char *inbuf = (const unsigned char *) *src; + temp_state = *data.__statep; + data.__statep = &temp_state; + result = 0; data.__outbufend = (unsigned char *) buf + sizeof (buf); do |