summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/wcstombs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/locale/wcstombs.c')
-rw-r--r--lib/libc/locale/wcstombs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/locale/wcstombs.c b/lib/libc/locale/wcstombs.c
index acd0051..250d2b9 100644
--- a/lib/libc/locale/wcstombs.c
+++ b/lib/libc/locale/wcstombs.c
@@ -37,7 +37,9 @@ wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n)
{
static const mbstate_t initial;
mbstate_t mbs;
+ const wchar_t *pwcsp;
mbs = initial;
- return (__wcsnrtombs(s, &pwcs, SIZE_T_MAX, n, &mbs));
+ pwcsp = pwcs;
+ return (__wcsnrtombs(s, &pwcsp, SIZE_T_MAX, n, &mbs));
}
OpenPOWER on IntegriCloud