summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-11-16 16:59:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-11-16 16:59:34 (GMT)
commit81a213ed4ce77b15fbc6d5d97cc1235b689ad482 (patch)
tree02de1ac6dd6c22c81c4c8e7163f777b90183db97 /unix/tclUnixFile.c
parent31b544baefc9bf84fded3c7dfb98da9db1032e10 (diff)
parent6c20a6ff0d3a2aea218b48df0ff32aafeb23167d (diff)
downloadtcl-81a213ed4ce77b15fbc6d5d97cc1235b689ad482.zip
tcl-81a213ed4ce77b15fbc6d5d97cc1235b689ad482.tar.gz
tcl-81a213ed4ce77b15fbc6d5d97cc1235b689ad482.tar.bz2
Merge 8.7
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 6cbdec9..998614d 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -41,10 +41,10 @@ TclpFindExecutable(
{
Tcl_Encoding encoding;
int length;
- wchar_t buf[PATH_MAX];
+ wchar_t buf[PATH_MAX] = L"";
char name[PATH_MAX * 3 + 1];
- GetModuleFileNameW(NULL, buf, sizeof(buf)/sizeof(wchar_t));
+ GetModuleFileNameW(NULL, buf, PATH_MAX);
cygwin_conv_path(3, buf, name, sizeof(name));
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {