Sebastian Lackner : shell32: Fix incorrect size argument of FormatMessageW.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 2 08:51:51 CST 2015


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

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Sat Feb 28 19:58:59 2015 +0100

shell32: Fix incorrect size argument of FormatMessageW.

---

 dlls/shell32/shlfileop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 62d7880..e7e24e0 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -292,7 +292,7 @@ static BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir, FI
 
 	args[0] = (DWORD_PTR)szDir;
 	FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY,
-	               szText, 0, 0, szBuffer, sizeof(szBuffer), (__ms_va_list*)args);
+	               szText, 0, 0, szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0]), (__ms_va_list*)args);
         hIcon = LoadIconW(ids.hIconInstance, (LPWSTR)MAKEINTRESOURCE(ids.icon_resource_id));
 
         ret = SHELL_ConfirmMsgBox(hWnd, szBuffer, szCaption, hIcon, op && op->bManyItems);




More information about the wine-cvs mailing list