summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-22 18:00:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-22 18:00:15 (GMT)
commit1451fc75379ac268ba27e88795a1ae76b64baf3f (patch)
tree1da5bc54feebfd58704161673bf96924cd586108 /generic/tclUtf.c
parent32860a274226775aadb4673c849ae97b331d5ed6 (diff)
parentc103cb5d100f5ae113e9347b3b9c5c6f44e8a972 (diff)
downloadtcl-1451fc75379ac268ba27e88795a1ae76b64baf3f.zip
tcl-1451fc75379ac268ba27e88795a1ae76b64baf3f.tar.gz
tcl-1451fc75379ac268ba27e88795a1ae76b64baf3f.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 845690c..1a6ab68 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -477,7 +477,7 @@ Tcl_UtfToUniChar(
}
return 1;
} else if (byte < 0xE0) {
- if ((src[1] & 0xC0) == 0x80) {
+ if ((byte != 0xC1) && ((src[1] & 0xC0) == 0x80)) {
/*
* Two-byte-character lead-byte followed by a trail-byte.
*/
@@ -572,7 +572,7 @@ Tcl_UtfToChar16(
}
return 1;
} else if (byte < 0xE0) {
- if ((src[1] & 0xC0) == 0x80) {
+ if ((byte != 0xC1) && ((src[1] & 0xC0) == 0x80)) {
/*
* Two-byte-character lead-byte followed by a trail-byte.
*/