summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclUtf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 65a3f41..57e58c1 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -1296,11 +1296,11 @@ Tcl_UtfNcmp(
if (ch1 != ch2) {
#if TCL_UTF_MAX == 4
/* Surrogates always report higher than non-surrogates */
- if (((ch1 & ~0x3FF) == 0xD800)) {
- if ((ch2 & ~0x3FF) != 0xD800) {
+ if (((ch1 & 0xFC00) == 0xD800)) {
+ if ((ch2 & 0xFC00) != 0xD800) {
return ch1;
}
- } else if ((ch2 & ~0x3FF) == 0xD800) {
+ } else if ((ch2 & 0xFC00) == 0xD800) {
return -ch2;
}
#endif