diff options
Diffstat (limited to 'lib/libc/locale/mbstowcs.c')
-rw-r--r-- | lib/libc/locale/mbstowcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/locale/mbstowcs.c b/lib/libc/locale/mbstowcs.c index ad259d8..194ec2e 100644 --- a/lib/libc/locale/mbstowcs.c +++ b/lib/libc/locale/mbstowcs.c @@ -37,7 +37,9 @@ mbstowcs(wchar_t * __restrict pwcs, const char * __restrict s, size_t n) { static const mbstate_t initial; mbstate_t mbs; + const char *sp; mbs = initial; - return (__mbsnrtowcs(pwcs, &s, SIZE_T_MAX, n, &mbs)); + sp = s; + return (__mbsnrtowcs(pwcs, &sp, SIZE_T_MAX, n, &mbs)); } |