X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=functions%2Fuchar%2Fc32rtomb.c;h=d9f016dc1e121a7ebd616e2ddcd84cbf19d80c1e;hp=b72b7e9e8bcf6199c144640ba59f3bcb3d18dd09;hb=f5333321e880f4e708816d0635b1e338e05b405b;hpb=32967d59c57ca69410f1f69c298d79af53f9ae97 diff --git a/functions/uchar/c32rtomb.c b/functions/uchar/c32rtomb.c index b72b7e9..d9f016d 100644 --- a/functions/uchar/c32rtomb.c +++ b/functions/uchar/c32rtomb.c @@ -23,6 +23,9 @@ size_t c32rtomb_l( locale_t restrict l ) { + char buf[s ? 0 : MB_CUR_MAX]; + s = s ? s : buf; + const char32_t *restrict psrc = &c32; size_t srcsz = 1; size_t dstsz = MB_CUR_MAX;