Fixed memory allocation bug.

This commit is contained in:
Eric Frias 2004-07-14 21:46:25 +00:00 committed by Alexandre Julliard
parent 170dbf4243
commit 0b072cb67a
1 changed files with 2 additions and 2 deletions

View File

@ -592,7 +592,7 @@ static HGLOBAL WDML_BuildExecuteCommand(WDML_CONV* pConv, LPCVOID pData, DWORD c
}
else
{
memSize = MultiByteToWideChar( CP_ACP, 0, pData, cbData, NULL, 0);
memSize = MultiByteToWideChar( CP_ACP, 0, pData, cbData, NULL, 0) * sizeof(WCHAR);
}
}
@ -617,7 +617,7 @@ static HGLOBAL WDML_BuildExecuteCommand(WDML_CONV* pConv, LPCVOID pData, DWORD c
}
else
{
MultiByteToWideChar( CP_ACP, 0, pData, cbData, (LPWSTR)pDst, memSize);
MultiByteToWideChar( CP_ACP, 0, pData, cbData, (LPWSTR)pDst, memSize/sizeof(WCHAR));
}
}