summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-10 13:42:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-10 13:42:52 (GMT)
commit86c130f239e17b4c14250bba02e65c9141daf99b (patch)
treeeadcf01e78e16a682daa86a5478c69b49752710b /generic/tclEncoding.c
parent4a214309b28e754509933e08bd3968548a73f34c (diff)
parentdb4a693d72766bc7a355c1012d5bcd0f12841c5b (diff)
downloadtcl-86c130f239e17b4c14250bba02e65c9141daf99b.zip
tcl-86c130f239e17b4c14250bba02e65c9141daf99b.tar.gz
tcl-86c130f239e17b4c14250bba02e65c9141daf99b.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index a326856..0d03e2a 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -2413,7 +2413,7 @@ UtfToUtfProc(
/* A surrogate character is detected, handle especially */
Tcl_UniChar low = *chPtr;
size_t len = (src <= srcEnd-3) ? Tcl_UtfToUniChar(src, &low) : 0;
- if (((low | 0x3FF) != 0xDFFF) || !(*chPtr & 0x800)) {
+ if (((low | 0x3FF) != 0xDFFF) || (*chPtr & 0x400)) {
*dst++ = (char) (((*chPtr >> 12) | 0xE0) & 0xEF);
*dst++ = (char) (((*chPtr >> 6) | 0x80) & 0xBF);
*dst++ = (char) ((*chPtr | 0x80) & 0xBF);