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

This commit is contained in:
Alexandre Julliard 2010-05-24 20:33:28 +02:00
parent ab111025c0
commit 598a25de82
1 changed files with 18 additions and 14 deletions

View File

@ -151,26 +151,30 @@ 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);
comp_ver = msi_version_str_to_dword(ver); if (ver)
r = check - comp_ver;
if (r < 0 || (r == 0 && !(attributes &
msidbUpgradeAttributesVersionMinInclusive)))
{ {
RegCloseKey(hukey); comp_ver = msi_version_str_to_dword(ver);
index ++; r = check - comp_ver;
continue; if (r < 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMinInclusive)))
{
RegCloseKey(hukey);
index ++;
continue;
}
} }
/* check max */ /* check max */
ver = MSI_RecordGetString(rec,3); ver = MSI_RecordGetString(rec,3);
comp_ver = msi_version_str_to_dword(ver); if (ver)
r = check - comp_ver;
if (r > 0 || (r == 0 && !(attributes &
msidbUpgradeAttributesVersionMaxInclusive)))
{ {
RegCloseKey(hukey); comp_ver = msi_version_str_to_dword(ver);
index ++; r = check - comp_ver;
continue; if (r > 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMaxInclusive)))
{
RegCloseKey(hukey);
index ++;
continue;
}
} }
/* check language*/ /* check language*/