diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-23 13:30:01 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-23 13:30:01 (GMT) |
commit | 5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35 (patch) | |
tree | f6bba9b64f34a1b2b941103e05773ffe545c1e91 /win/tclWinInit.c | |
parent | 06ea55d820a91810fe57afda632449d0bca2fe52 (diff) | |
parent | 4723df2a35ce7e7a2d460213d01c361be26a1772 (diff) | |
download | tcl-5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35.zip tcl-5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35.tar.gz tcl-5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35.tar.bz2 |
Merge 8.6. Fix Cygwin compile
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r-- | win/tclWinInit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c index a50d9eb..2830a85 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -334,8 +334,8 @@ InitializeDefaultLibraryDir( char name[(MAX_PATH + LIBRARY_SIZE) * 3]; char *end, *p; - GetModuleFileNameW(hModule, wName, MAX_PATH); - WideCharToMultiByte(CP_UTF8, 0, wName, -1, name, MAX_PATH * 3, NULL, NULL); + GetModuleFileNameW(hModule, wName, sizeof(wName)/sizeof(WCHAR)); + WideCharToMultiByte(CP_UTF8, 0, wName, -1, name, sizeof(name), NULL, NULL); end = strrchr(name, '\\'); *end = '\0'; @@ -382,8 +382,8 @@ InitializeSourceLibraryDir( char name[(MAX_PATH + LIBRARY_SIZE) * 3]; char *end, *p; - GetModuleFileNameW(hModule, wName, MAX_PATH); - WideCharToMultiByte(CP_UTF8, 0, wName, -1, name, MAX_PATH * 3, NULL, NULL); + GetModuleFileNameW(hModule, wName, sizeof(wName)/sizeof(WCHAR)); + WideCharToMultiByte(CP_UTF8, 0, wName, -1, name, sizeof(name), NULL, NULL); end = strrchr(name, '\\'); *end = '\0'; |