diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-23 13:30:45 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-23 13:30:45 (GMT) |
commit | 7e63083ea10c94a9a905807f6f457820303f787f (patch) | |
tree | 0db35f66b0aaef9cca59a04278f416a90673bebc /win/tclWinInit.c | |
parent | 92eff9a92206e2292cbd5dbc8e2320ce874ea7fb (diff) | |
parent | 5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35 (diff) | |
download | tcl-7e63083ea10c94a9a905807f6f457820303f787f.zip tcl-7e63083ea10c94a9a905807f6f457820303f787f.tar.gz tcl-7e63083ea10c94a9a905807f6f457820303f787f.tar.bz2 |
Merge 8.7
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 7205498..5817377 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'; |