Commit fd160033 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix errors in IExtractIcon detected by valgrind.

parent d4983579
......@@ -192,7 +192,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
if (HCR_GetDefaultIconA(xriid, sTemp, MAX_PATH, &dwNr))
{
MultiByteToWideChar(CP_ACP, 0, sTemp, MAX_PATH, szIconFile, cchMax);
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
*piIndex = dwNr;
}
else
......@@ -206,7 +206,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
{
if (HCR_GetDefaultIconA("Drive", sTemp, MAX_PATH, &dwNr))
{
MultiByteToWideChar(CP_ACP, 0, sTemp, MAX_PATH, szIconFile, cchMax);
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
*piIndex = dwNr;
}
else
......@@ -219,7 +219,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
{
if (HCR_GetDefaultIconA("Folder", sTemp, MAX_PATH, &dwNr))
{
MultiByteToWideChar(CP_ACP, 0, sTemp, MAX_PATH, szIconFile, cchMax);
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
}
else
{
......@@ -241,7 +241,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
}
else
{
MultiByteToWideChar(CP_ACP, 0, sTemp, MAX_PATH, szIconFile, cchMax);
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
*piIndex = dwNr;
}
}
......
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