diff options
author | tjr <tjr@FreeBSD.org> | 2002-10-16 12:09:43 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-10-16 12:09:43 +0000 |
commit | 3a88c84c050889dfcdf58a721602c40f9ae03a96 (patch) | |
tree | 47fcbdba053baaebb80400ad1d663fa57af766bc /lib/libc/stdio/vfwprintf.c | |
parent | ccd9275d4ea58567606a870a1c0faabbbabd889b (diff) | |
download | FreeBSD-src-3a88c84c050889dfcdf58a721602c40f9ae03a96.zip FreeBSD-src-3a88c84c050889dfcdf58a721602c40f9ae03a96.tar.gz |
Set the error bit on the stream if an encoding error occurs. Improve
handling of multibyte sequences representing null wide characters.
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 e452744..1415dd3 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -903,8 +903,10 @@ fp_begin: if (prec == -1) cp = L"(null)"; else { convbuf = __mbsconv(mbp, prec); - if (convbuf == NULL) + if (convbuf == NULL) { + fp->_flags |= __SERR; goto error; + } cp = convbuf; } } |