diff options
Diffstat (limited to 'lib/libc/locale/wcstombs.c')
-rw-r--r-- | lib/libc/locale/wcstombs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/locale/wcstombs.c b/lib/libc/locale/wcstombs.c index cc5fab4..79ee279 100644 --- a/lib/libc/locale/wcstombs.c +++ b/lib/libc/locale/wcstombs.c @@ -33,7 +33,9 @@ __FBSDID("$FreeBSD$"); size_t wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n) { - static mbstate_t mbs; + static const mbstate_t initial; + mbstate_t mbs; + mbs = initial; return (wcsrtombs(s, &pwcs, n, &mbs)); } |