summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
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);
}