[GDI32] sync GetICMProfileA to wine

svn path=/trunk/; revision=72230
This commit is contained in:
Christoph von Wittich 2016-08-15 17:04:05 +00:00
parent 69a268849d
commit 3f62a5f7f8

View file

@ -144,11 +144,18 @@ GetICMProfileA(
DWORD buflen = MAX_PATH;
BOOL ret = FALSE;
if (!hdc || !pBufSize || !pszFilename) return FALSE;
if (!hdc || !pBufSize) return FALSE;
if (GetICMProfileW(hdc, &buflen, filenameW))
{
ULONG len = WideCharToMultiByte(CP_ACP, 0, filenameW, -1, NULL, 0, NULL, NULL);
if (!pszFilename)
{
*pBufSize = len;
return FALSE;
}
if (*pBufSize >= len)
{
WideCharToMultiByte(CP_ACP, 0, filenameW, -1, pszFilename, *pBufSize, NULL, NULL);