diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-10-16 12:09:43 +0000 | 
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-10-16 12:09:43 +0000 | 
| commit | 6180233fd804806e7301790d2330da50ca57e71f (patch) | |
| tree | 47fcbdba053baaebb80400ad1d663fa57af766bc /lib/libc/stdio/fputwc.c | |
| parent | 9acd2d9b3ce1cc08aa98adc434b11d8ef5b8b6f0 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/fputwc.c')
| -rw-r--r-- | lib/libc/stdio/fputwc.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/lib/libc/stdio/fputwc.c b/lib/libc/stdio/fputwc.c index 10c3c18a5c45..1f42ce9e808a 100644 --- a/lib/libc/stdio/fputwc.c +++ b/lib/libc/stdio/fputwc.c @@ -57,8 +57,10 @@ __fputwc(wchar_t wc, FILE *fp)  		len = 1;  	} else {  		memset(&mbs, 0, sizeof(mbs)); -		if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) +		if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) { +			fp->_flags |= __SERR;  			return (WEOF); +		}  	}  	for (i = 0; i < len; i++) | 
