Commit 130197b8 authored by Thomas Weidenmueller's avatar Thomas Weidenmueller Committed by Alexandre Julliard

MessageBoxIndirectA() should check whether the MB_USERICON bit is set

to prevent an exception.
parent 3e2af5d0
......@@ -427,10 +427,16 @@ INT WINAPI MessageBoxIndirectA( LPMSGBOXPARAMSA msgbox )
RtlCreateUnicodeStringFromAsciiz(&captionW, msgbox->lpszCaption);
else
captionW.Buffer = (LPWSTR)msgbox->lpszCaption;
if (HIWORD(msgbox->lpszIcon))
RtlCreateUnicodeStringFromAsciiz(&iconW, msgbox->lpszIcon);
if (msgbox->dwStyle & MB_USERICON)
{
if (HIWORD(msgbox->lpszIcon))
RtlCreateUnicodeStringFromAsciiz(&iconW, msgbox->lpszIcon);
else
iconW.Buffer = (LPWSTR)msgbox->lpszIcon;
}
else
iconW.Buffer = (LPWSTR)msgbox->lpszIcon;
iconW.Buffer = NULL;
msgboxW.cbSize = sizeof(msgboxW);
msgboxW.hwndOwner = msgbox->hwndOwner;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment