From 5b09820d7cb360233197e25216553549fbb37711 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 24 Oct 2010 11:08:30 +0200 Subject: [PATCH] comdlg32: Fixed bad size to GetModuleFilenameW. --- dlls/comdlg32/filedlg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 01b068ed7ca..2687029d89b 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -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; }