msi: Fix condition evaluation when comparing literal and integer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45445
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2018-07-13 13:12:51 +02:00 committed by Alexandre Julliard
parent 414fe80aeb
commit 7837ae20cd
2 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,7 @@ boolean_factor:
}
else if ($1.type == VALUE_LITERAL || $3.type == VALUE_LITERAL)
{
$$ = FALSE;
$$ = ($2 == COND_NE || $2 == COND_INE );
}
else if ($1.type == VALUE_SYMBOL) /* symbol operator integer */
{

View File

@ -2097,6 +2097,10 @@ static void test_condition(void)
ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r);
r = MsiEvaluateConditionA(hpkg, "&nofeature=\"\"");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
r = MsiEvaluateConditionA(hpkg, "&nofeature<>3");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
r = MsiEvaluateConditionA(hpkg, "\"\"<>3");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
r = MsiEvaluateConditionA(hpkg, "!nofeature=\"\"");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
MsiEvaluateConditionA(hpkg, "$nocomponent=\"\"");