From f18c6ba28dc677934e7bd9776188759303ead278 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Tue, 21 Oct 2008 16:13:40 -0500 Subject: [PATCH] msi: Only compare the file version if a version was specified. --- dlls/msi/appsearch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index a9113c9719..dc885bc617 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -657,9 +657,10 @@ static UINT ACTION_FileVersionMatches(const MSISIGNATURE *sig, LPCWSTR filePath, HIWORD(sig->MinVersionLS), LOWORD(sig->MinVersionLS)); } - else if (info->dwFileVersionMS > sig->MaxVersionMS - || (info->dwFileVersionMS == sig->MaxVersionMS && - info->dwFileVersionLS > sig->MaxVersionLS)) + else if ((sig->MaxVersionMS || sig->MaxVersionLS) && + (info->dwFileVersionMS > sig->MaxVersionMS || + (info->dwFileVersionMS == sig->MaxVersionMS && + info->dwFileVersionLS > sig->MaxVersionLS))) { TRACE("Greater than maximum version %d.%d.%d.%d\n", HIWORD(sig->MaxVersionMS),