summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-22 15:43:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-22 15:43:22 (GMT)
commite3e97685c5828c76e204f0b03aa9167f57aa8bf1 (patch)
tree03c7e10928abfd63195d2d3e2e3f7337d123e791 /generic/tclUtf.c
parent9fc36886d65d9528baf88a93e59957a5b125b778 (diff)
parent954d7b33134d9e2aef219ae5c829e4062eaf1da8 (diff)
downloadtcl-e3e97685c5828c76e204f0b03aa9167f57aa8bf1.zip
tcl-e3e97685c5828c76e204f0b03aa9167f57aa8bf1.tar.gz
tcl-e3e97685c5828c76e204f0b03aa9167f57aa8bf1.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index a59868a..ca4a166 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -2079,13 +2079,7 @@ Tcl_UniCharIsControl(
if (UNICODE_OUT_OF_RANGE(ch)) {
/* Clear away extension bits, if any */
ch &= 0x1FFFFF;
- if ((ch == 0xE0001) || ((ch >= 0xE0020) && (ch <= 0xE007F))) {
- return 1;
- }
- if ((ch >= 0xF0000) && ((ch & 0xFFFF) <= 0xFFFD)) {
- return 1;
- }
- return 0;
+ return ((ch == 0xE0001) || ((unsigned)(ch - 0xE0020) <= 0x5F));
}
return ((CONTROL_BITS >> GetCategory(ch)) & 1);
}