From 4c7e61bdbca84ca47a3400996676243ae26237f6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 30 Apr 2020 12:51:38 +0000 Subject: Let's not get out the src[3] check yet. --- generic/tclUtf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 802610c..e1cde17 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -601,7 +601,7 @@ Tcl_UtfToChar16( */ Tcl_UniChar high = (((byte & 0x07) << 8) | ((src[1] & 0x3F) << 2) | ((src[2] & 0x3F) >> 4)) - 0x40; - if ((high < 0x400) /*&& ((src[3] & 0xC0) == 0x80)*/) { + if ((high < 0x400) && ((src[3] & 0xC0) == 0x80)) { /* produce high surrogate, advance source pointer */ *chPtr = 0xD800 + high; return 1; -- cgit v0.12