msvcrt: Pass correct buffer size to snwprintf in DoMessageBoxW helper.

Spotted by Nikolay.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-12-27 14:09:36 +01:00 committed by Alexandre Julliard
parent 3e2ed9c761
commit 7ba79ca9d2
1 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,8 @@ static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *mess
MSVCRT_wchar_t text[2048];
INT ret;
MSVCRT__snwprintf(text,sizeof(text),message_format, lead, MSVCRT__wpgmptr, message);
MSVCRT__snwprintf(text, sizeof(text)/sizeof(text[0]), message_format,
lead, MSVCRT__wpgmptr, message);
msgbox.cbSize = sizeof(msgbox);
msgbox.hwndOwner = GetActiveWindow();