diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c index a7cd0923..af66379a 100644 --- a/src/stdio/vfwscanf.c +++ b/src/stdio/vfwscanf.c @@ -215,7 +215,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) if (t == 'c') { if (width<1) width = 1; invert = 1; - set = L""; + static const wchar_t empty[] = { 0 }; + set = empty; } else if (t == 's') { invert = 1; static const wchar_t spaces[] = { diff --git a/src/stdlib/wcstod.c b/src/stdlib/wcstod.c index 26fe9af8..bd1ef040 100644 --- a/src/stdlib/wcstod.c +++ b/src/stdlib/wcstod.c @@ -12,8 +12,9 @@ static size_t do_read(FILE *f, unsigned char *buf, size_t len) { size_t i; const wchar_t *wcs = f->cookie; + static const wchar_t strudel[] = { '@', 0 }; - if (!wcs[0]) wcs=L"@"; + if (!wcs[0]) wcs=strudel; for (i=0; ibuf_size && wcs[i]; i++) f->buf[i] = wcs[i] < 128 ? wcs[i] : '@'; f->rpos = f->buf; diff --git a/src/stdlib/wcstol.c b/src/stdlib/wcstol.c index 4443f577..4744910e 100644 --- a/src/stdlib/wcstol.c +++ b/src/stdlib/wcstol.c @@ -14,8 +14,9 @@ static size_t do_read(FILE *f, unsigned char *buf, size_t len) { size_t i; const wchar_t *wcs = f->cookie; + static const wchar_t strudel[] = { '@', 0 }; - if (!wcs[0]) wcs=L"@"; + if (!wcs[0]) wcs=strudel; for (i=0; ibuf_size && wcs[i]; i++) f->buf[i] = wcs[i] < 128 ? wcs[i] : '@'; f->rpos = f->buf;