summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-11 21:17:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-11 21:17:35 (GMT)
commit6ba55114e28426856f8905b08e31340c268459d5 (patch)
tree64965fc956ba33e50b39c133ad0b2360e322ce03 /generic/tclMain.c
parent9888ccda67f1a91d95ba372d5f008f939da39b6b (diff)
downloadtcl-6ba55114e28426856f8905b08e31340c268459d5.zip
tcl-6ba55114e28426856f8905b08e31340c268459d5.tar.gz
tcl-6ba55114e28426856f8905b08e31340c268459d5.tar.bz2
Fix handling of length (size_t)-1 in tclMain.c. This should fix handling of command-line arguments with TCL_UTF_MAX=6, necessary to make tclsh run at all ...
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index ea69b2d..31e6438 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -70,7 +70,7 @@ NewNativeObj(
Tcl_DString ds;
#ifdef UNICODE
- if (length > 0) {
+ if (length != TCL_AUTO_LENGTH) {
length *= sizeof(WCHAR);
}
Tcl_WinTCharToUtf(string, length, &ds);