From 598a25de82ca6c86340c8bffbaaef2d8a432cd99 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 24 May 2010 20:33:28 +0200 Subject: [PATCH] msi: Ignore min/max versions if their values are null. --- dlls/msi/upgrade.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index f9e35a40a79..b131d666fe2 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -151,26 +151,30 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param) (LPBYTE)&check, &sz); /* check min */ ver = MSI_RecordGetString(rec,2); - comp_ver = msi_version_str_to_dword(ver); - r = check - comp_ver; - if (r < 0 || (r == 0 && !(attributes & - msidbUpgradeAttributesVersionMinInclusive))) + if (ver) { - RegCloseKey(hukey); - index ++; - continue; + comp_ver = msi_version_str_to_dword(ver); + r = check - comp_ver; + if (r < 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMinInclusive))) + { + RegCloseKey(hukey); + index ++; + continue; + } } /* check max */ ver = MSI_RecordGetString(rec,3); - comp_ver = msi_version_str_to_dword(ver); - r = check - comp_ver; - if (r > 0 || (r == 0 && !(attributes & - msidbUpgradeAttributesVersionMaxInclusive))) + if (ver) { - RegCloseKey(hukey); - index ++; - continue; + comp_ver = msi_version_str_to_dword(ver); + r = check - comp_ver; + if (r > 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMaxInclusive))) + { + RegCloseKey(hukey); + index ++; + continue; + } } /* check language*/