Do not pass an invalid target buffer info to WideCharToMultiByte.

This commit is contained in:
Dmitry Timoshkov 2005-05-12 09:56:35 +00:00 committed by Alexandre Julliard
parent 30428b5a35
commit ac5b025103
1 changed files with 3 additions and 3 deletions

View File

@ -373,9 +373,9 @@ static void intern_atoms(void)
for (format = ClipFormats, i = 0; format; format = format->NextFormat) {
if (!format->drvData) {
len = WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, NULL, -1, 0, 0);
names[i] = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, names[i++], len, 0, 0);
len = WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, NULL, 0, NULL, NULL);
names[i] = HeapAlloc(GetProcessHeap(), 0, len);
WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, names[i++], len, NULL, NULL);
}
}