summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-30 12:22:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-30 12:22:57 (GMT)
commitd269d8c27e6590935a342e500c118749c19939fc (patch)
tree092cf1e0a417bc71b67c82ff0c63b555dc39c4cd /generic
parenta496475bd259f67e2f9b2f787dcd35e49cc64974 (diff)
parent2ac074313bbc4ff0bb4399ffb362e1b400ca2f64 (diff)
downloadtcl-d269d8c27e6590935a342e500c118749c19939fc.zip
tcl-d269d8c27e6590935a342e500c118749c19939fc.tar.gz
tcl-d269d8c27e6590935a342e500c118749c19939fc.tar.bz2
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEncoding.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 3bbb360..0b86123 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -2506,7 +2506,7 @@ UtfToUtf16Proc(
*dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
*dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
*dst++ = (*chPtr & 0xFF);
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
+ *dst++ = ((*chPtr >> 8) & 0x3) | 0xDC;
}
#else
*dst++ = (*chPtr & 0xFF);
@@ -2518,10 +2518,10 @@ UtfToUtf16Proc(
*dst++ = (*chPtr >> 8);
*dst++ = (*chPtr & 0xFF);
} else {
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
- *dst++ = (*chPtr & 0xFF);
*dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
*dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
+ *dst++ = ((*chPtr >> 8) & 0x3) | 0xDC;
+ *dst++ = (*chPtr & 0xFF);
}
#else
*dst++ = (*chPtr >> 8);