summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-20 14:19:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-20 14:19:47 (GMT)
commit8ff40f7d464bb599fa69cd1a8a16d89edf1ef3c7 (patch)
tree76766700a957612731a3f874580f69cd4fbed17b /generic/tclScan.c
parent041d53289bc378deaabc7600ef8e79e5e6c4d8e9 (diff)
parent12d3b15f307754ea15cceabd761e0f60346e9cc4 (diff)
downloadtcl-8ff40f7d464bb599fa69cd1a8a16d89edf1ef3c7.zip
tcl-8ff40f7d464bb599fa69cd1a8a16d89edf1ef3c7.tar.gz
tcl-8ff40f7d464bb599fa69cd1a8a16d89edf1ef3c7.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r--generic/tclScan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index f499711..20cb9d0 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -265,7 +265,7 @@ ValidateFormat(
* these are messy operations because we do
* not want to use the formatting engine;
* we're inside there! */
- char buf[TCL_UTF_MAX + 1] = "";
+ char buf[5] = "";
/*
* Initialize an array that records the number of times a variable is
@@ -877,7 +877,7 @@ Tcl_ScanObjCmd(
offset = TclUtfToUniChar(string, &sch);
i = (int)sch;
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
if ((sch >= 0xD800) && (offset < 3)) {
offset += TclUtfToUniChar(string+offset, &sch);
i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF);