X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fwchar%2Fwcrtomb.c;fp=functions%2Fwchar%2Fwcrtomb.c;h=0372471957d557a7246f9c360df89cbba15b7f43;hb=84f522b0a2fe01d976da2905a74e47b28edf99e1;hp=e692923c53121d322f31f679845bb8c9b09d1ea2;hpb=b6e8bf8a826e92bfe76d487afbdeac9846642bcd;p=pdclib diff --git a/functions/wchar/wcrtomb.c b/functions/wchar/wcrtomb.c index e692923..0372471 100644 --- a/functions/wchar/wcrtomb.c +++ b/functions/wchar/wcrtomb.c @@ -32,7 +32,8 @@ size_t wcrtomb( mbstate_t *restrict ps ) { - return _PDCLIB_cwcrtomb(s, wc, ps); + static mbstate_t st; + return _PDCLIB_cwcrtomb(s, wc, ps ? ps : &st); } #endif