Skip to content

Commit 81f2817

Browse files
committed
implements fixes from jruizgit#386
1 parent 72070f4 commit 81f2817

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rules/events.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,10 @@ static unsigned int reduceExpressionSequence(ruleset *tree,
609609
}
610610

611611

612-
if ((operator == OP_AND && !targetProperty->value.b) ||
613-
(operator == OP_OR && targetProperty->value.b)) {
614-
while (currentExpression->operator != OP_END) {
615-
++*i;
612+
if ((((operator == OP_AND) && !targetProperty->value.b) ||
613+
((operator == OP_OR) && targetProperty->value.b))
614+
&& (*i < exprs->length)) {
615+
while ((currentExpression->operator != OP_END) && (++*i < exprs->length)) {
616616
currentExpression = &exprs->expressions[*i];
617617
}
618618
return RULES_OK;

0 commit comments

Comments
 (0)