diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2022-12-30 20:27:47 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2022-12-30 20:27:47 (GMT) |
commit | a801c2d4741015dbb5875938248eff1701e1ff29 (patch) | |
tree | a01ac109d5044cad7c553a96da6bca4cb986f60b /generic/tclEncoding.c | |
parent | 3b45005127de0885251471d5591ecb58c5b3e286 (diff) | |
download | tcl-a801c2d4741015dbb5875938248eff1701e1ff29.zip tcl-a801c2d4741015dbb5875938248eff1701e1ff29.tar.gz tcl-a801c2d4741015dbb5875938248eff1701e1ff29.tar.bz2 |
Fix DoReadChars() to correctly discard encoding errors after eofchar has been seen, and add new test, io-75.8.invalid.
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index d10d9ca..37b3073 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2386,7 +2386,12 @@ UtfToUtfProc( *dst++ = *src++; } else if ((UCHAR(*src) == 0xC0) && (src + 1 < srcEnd) - && (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) { + && (UCHAR(src[1]) == 0x80) + && ( + !(flags & TCL_ENCODING_MODIFIED) + || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) + )) + { /* * If in input mode, and -strict is specified: This is an error. */ |