Commit 8e6e015e authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Add missing terminator on %wc format conversion.

parent 6c64da8b
......@@ -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
{
......
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