Commit 598a25de authored by Alexandre Julliard's avatar Alexandre Julliard

msi: Ignore min/max versions if their values are null.

parent ab111025
...@@ -151,27 +151,31 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param) ...@@ -151,27 +151,31 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
(LPBYTE)&check, &sz); (LPBYTE)&check, &sz);
/* check min */ /* check min */
ver = MSI_RecordGetString(rec,2); ver = MSI_RecordGetString(rec,2);
if (ver)
{
comp_ver = msi_version_str_to_dword(ver); comp_ver = msi_version_str_to_dword(ver);
r = check - comp_ver; r = check - comp_ver;
if (r < 0 || (r == 0 && !(attributes & if (r < 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMinInclusive)))
msidbUpgradeAttributesVersionMinInclusive)))
{ {
RegCloseKey(hukey); RegCloseKey(hukey);
index ++; index ++;
continue; continue;
} }
}
/* check max */ /* check max */
ver = MSI_RecordGetString(rec,3); ver = MSI_RecordGetString(rec,3);
if (ver)
{
comp_ver = msi_version_str_to_dword(ver); comp_ver = msi_version_str_to_dword(ver);
r = check - comp_ver; r = check - comp_ver;
if (r > 0 || (r == 0 && !(attributes & if (r > 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMaxInclusive)))
msidbUpgradeAttributesVersionMaxInclusive)))
{ {
RegCloseKey(hukey); RegCloseKey(hukey);
index ++; index ++;
continue; continue;
} }
}
/* check language*/ /* check language*/
sz = sizeof(DWORD); sz = sizeof(DWORD);
......
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