summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-13 22:06:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-13 22:06:10 (GMT)
commit8c3eb78cf7bd96819cbf50c6552954c785098f69 (patch)
treeef70c73ff15c99c137682381b9c15c4871fe505c /generic/tclScan.c
parent14b5289e4aa4945dd080d1d3d2dad7f54537eec8 (diff)
parent73cc9cd62f844146e1d9a835511da3b641aafac0 (diff)
downloadtcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.zip
tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.tar.gz
tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.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 9c9137c..054d935 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -267,7 +267,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
@@ -880,7 +880,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);