Commit dbdd94ba authored by James Abbatiello's avatar James Abbatiello Committed by Alexandre Julliard

Allow FormatMessage to load Unicode string resources.

parent ea1afcef
...@@ -88,7 +88,10 @@ static INT load_messageA( HMODULE instance, UINT id, WORD lang, ...@@ -88,7 +88,10 @@ static INT load_messageA( HMODULE instance, UINT id, WORD lang,
if (buffer == NULL) if (buffer == NULL)
return slen; return slen;
if (i>0) { if (i>0) {
lstrcpynA(buffer,(char*)mre->Text,i); if (mre->Flags & MESSAGE_RESOURCE_UNICODE)
lstrcpynWtoA(buffer, (LPWSTR)mre->Text, i);
else
lstrcpynA(buffer, (LPSTR)mre->Text, i);
buffer[i]=0; buffer[i]=0;
} else { } else {
if (buflen>1) { if (buflen>1) {
......
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