Commit 0d13a99e authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msi: Translate the resulting string only if the previous call succeeded.

parent bcd6e9f3
......@@ -1610,8 +1610,10 @@ UINT WINAPI MsiProvideQualifiedComponentA( LPCSTR szComponent,
msi_free(szwComponent);
msi_free(szwQualifier);
*pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
lpPathBuf, *pcchPathBuf, NULL, NULL);
if (rc == ERROR_SUCCESS)
*pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
lpPathBuf, *pcchPathBuf, NULL, NULL);
msi_free(lpwPathBuf);
return rc;
......
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