kernel32: Add missing terminator on %wc format conversion.

This commit is contained in:
Alexandre Julliard 2009-05-21 13:31:01 +02:00
parent 6c64da8b7c
commit 8e6e015eb5
1 changed files with 2 additions and 1 deletions

View File

@ -266,8 +266,9 @@ DWORD WINAPI FormatMessageA(
else if (strcmp(fmtstr, "%wc") == 0)
{
sz = WideCharToMultiByte(CP_ACP, 0, (WCHAR *)argliststart, 1, NULL, 0, NULL, NULL);
b = HeapAlloc(GetProcessHeap(), 0, sz);
b = HeapAlloc(GetProcessHeap(), 0, sz + 1);
WideCharToMultiByte(CP_ACP, 0, (WCHAR *)argliststart, 1, b, sz, NULL, NULL);
b[sz] = 0;
}
else
{