comdlg32: Fixed bad size to GetModuleFilenameW.

This commit is contained in:
Marcus Meissner 2010-10-24 11:08:30 +02:00 committed by Alexandre Julliard
parent 2c91ccede6
commit 5b09820d7c
1 changed files with 2 additions and 2 deletions

View File

@ -2070,7 +2070,7 @@ static void FILEDLG95_MRU_save_filename(LPCWSTR filename)
HKEY hkey;
/* get the current executable's name */
if(!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, sizeof(module_path))){
if(!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, sizeof(module_path)/sizeof(module_path[0]))) {
WARN("GotModuleFileName failed: %d\n", GetLastError());
return;
}
@ -2157,7 +2157,7 @@ static void FILEDLG95_MRU_load_filename(LPWSTR stored_path)
WCHAR module_path[MAX_PATH], *module_name;
/* get the current executable's name */
if(!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, sizeof(module_path))){
if(!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, sizeof(module_path)/sizeof(module_path[0]))) {
WARN("GotModuleFileName failed: %d\n", GetLastError());
return;
}