summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-11-30 13:14:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-11-30 13:14:43 (GMT)
commit72998869a3be3534fec99499faabe2d1557d6bcb (patch)
tree85593ed297518fcde58853b7fa1d2cb98b1a0e6d /generic/tclScan.c
parentc47ba70f4545f7c961160a6beb0a466e3bfd5532 (diff)
downloadtcl-72998869a3be3534fec99499faabe2d1557d6bcb.zip
tcl-72998869a3be3534fec99499faabe2d1557d6bcb.tar.gz
tcl-72998869a3be3534fec99499faabe2d1557d6bcb.tar.bz2
Fix [8e1e31eac0fd6b6c4452bc108a98ab08c6b64588|8e1e31eac0]: lsort treats NUL chars strangely. Also fix various initializations, which only make a difference when TCL_UTF_MAX == 4.
Add new test-cases which demonstrate the fix. For TCL_UTF_MAX == 4, surrogates will now be handled as expected as well when sorting.
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r--generic/tclScan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 7f71262..e0798df 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -889,7 +889,7 @@ Tcl_ScanObjCmd(
i = (int)sch;
#if TCL_UTF_MAX == 4
if (!offset) {
- offset = Tcl_UtfToUniChar(string, &sch);
+ offset = TclUtfToUniChar(string, &sch);
i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF);
}
#endif