diff options
Diffstat (limited to 'src/stdio')
-rw-r--r-- | src/stdio/vfwprintf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c index 281f4e56..deff9828 100644 --- a/src/stdio/vfwprintf.c +++ b/src/stdio/vfwprintf.c @@ -296,6 +296,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ case 'm': arg.p = strerror(errno); case 's': + if (!arg.p) arg.p = "(null)"; bs = arg.p; if (p<0) p = INT_MAX; for (i=l=0; l<p && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++); |