Commit 1fed032a authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Only copy the resulting string if the RegistryValue call succeeded.

parent 1ed12b76
......@@ -804,7 +804,7 @@ static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LP
V_I4(&vararg) = iValue;
hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, vtResult);
if (vtResult == VT_BSTR) lstrcpyW(szString, V_BSTR(&varresult));
if (SUCCEEDED(hr) && vtResult == VT_BSTR) lstrcpyW(szString, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
......
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