From dbdd94ba4b807d4b30cc97378b736b4036a3a2ec Mon Sep 17 00:00:00 2001 From: James Abbatiello Date: Tue, 22 Aug 2000 20:37:44 +0000 Subject: [PATCH] Allow FormatMessage to load Unicode string resources. --- dlls/kernel/format_msg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/kernel/format_msg.c b/dlls/kernel/format_msg.c index 3d2f95965e5..eab792227fc 100644 --- a/dlls/kernel/format_msg.c +++ b/dlls/kernel/format_msg.c @@ -88,7 +88,10 @@ static INT load_messageA( HMODULE instance, UINT id, WORD lang, if (buffer == NULL) return slen; 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; } else { if (buflen>1) { -- 2.11.4.GIT