diff options
Diffstat (limited to 'lib/libc/stdio/vfwprintf.c')
-rw-r--r-- | lib/libc/stdio/vfwprintf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index 4350c48..b75c504 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -531,8 +531,10 @@ __vfwprintf(FILE *fp, locale_t locale, const wchar_t *fmt0, va_list ap) /* sorry, fwprintf(read_only_file, L"") returns WEOF, not 0 */ - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } convbuf = NULL; fmt = (wchar_t *)fmt0; |