summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-24 16:43:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-24 16:43:41 (GMT)
commitf0800555067a88f3f16b15ce5f99a77c506c589b (patch)
tree230bc453c55dda145e1f223144ed01a4f3195791 /generic/tclUtf.c
parent2c246b85fae14c8d8b6fd0025fbfe83f89d916f4 (diff)
downloadtcl-f0800555067a88f3f16b15ce5f99a77c506c589b.zip
tcl-f0800555067a88f3f16b15ce5f99a77c506c589b.tar.gz
tcl-f0800555067a88f3f16b15ce5f99a77c506c589b.tar.bz2
Since only bytes 0xF0 - 0xF4 can be the first byte of a valid 4-byte UTF-8 byte sequence, account for that in Tcl_UtfCharComplete(). Only effective when TCL_UTF_MAX>3
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 1ef35a6..34fcdb5 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -69,11 +69,11 @@ static CONST unsigned char totalBytes[256] = {
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
#if TCL_UTF_MAX > 3
- 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,
#else
- 1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,
#endif
- 1,1,1,1,1,1,1,1
+ 1,1,1,1,1,1,1,1,1,1,1
};
/*