summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
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.
*/