Marcus Meissner : comdlg32: Fixed bad size to GetModuleFilenameW.

Alexandre Julliard julliard at winehq.org
Mon Oct 25 10:58:19 CDT 2010


Module: wine
Branch: master
Commit: 5b09820d7cb360233197e25216553549fbb37711
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5b09820d7cb360233197e25216553549fbb37711

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Oct 24 11:08:30 2010 +0200

comdlg32: Fixed bad size to GetModuleFilenameW.

---

 dlls/comdlg32/filedlg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index 01b068e..2687029 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;
     }




More information about the wine-cvs mailing list