summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fgetwc.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-10-16 12:09:43 +0000
committertjr <tjr@FreeBSD.org>2002-10-16 12:09:43 +0000
commit3a88c84c050889dfcdf58a721602c40f9ae03a96 (patch)
tree47fcbdba053baaebb80400ad1d663fa57af766bc /lib/libc/stdio/fgetwc.c
parentccd9275d4ea58567606a870a1c0faabbbabd889b (diff)
downloadFreeBSD-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/fgetwc.c')
-rw-r--r--lib/libc/stdio/fgetwc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/stdio/fgetwc.c b/lib/libc/stdio/fgetwc.c
index 311391a..93438a6 100644
--- a/lib/libc/stdio/fgetwc.c
+++ b/lib/libc/stdio/fgetwc.c
@@ -104,5 +104,6 @@ __fgetwc_nbf(FILE *fp)
while (n-- != 0)
__ungetc((unsigned char)buf[n], fp);
errno = EILSEQ;
+ fp->_flags |= __SERR;
return (WEOF);
}
OpenPOWER on IntegriCloud