diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-02-15 20:26:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-02-15 20:26:10 (GMT) |
commit | f06c5e7af1c85806bcbce3202000670b90ab4528 (patch) | |
tree | 60db88a86a34abcd731671a42c16357e79d8ebd2 /generic | |
parent | 4c2d834fca441a8d463e3bd1a06489f0b864cf73 (diff) | |
download | tcl-f06c5e7af1c85806bcbce3202000670b90ab4528.zip tcl-f06c5e7af1c85806bcbce3202000670b90ab4528.tar.gz tcl-f06c5e7af1c85806bcbce3202000670b90ab4528.tar.bz2 |
Fix for [33ab6d08eb]: Inconsistent behavior with encoding convertfrom -failindex
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclEncoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index c4db314..af7f30a 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2433,7 +2433,7 @@ UtfToUtfProc( const char *saveSrc = src; size_t len = TclUtfToUCS4(src, &ch); if ((len < 2) && (ch != 0) && (flags & ENCODING_INPUT) - && (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) { + && (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX))) { result = TCL_CONVERT_SYNTAX; break; } |