Skip to content

Commit

Permalink
Merge branch 'master' into host
Browse files Browse the repository at this point in the history
  • Loading branch information
critical27 authored May 30, 2019
2 parents 2b4ce6a + af8ea8d commit 2e09077
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/common/filter/Expressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,12 +1047,16 @@ std::string LogicalExpression::toString() const {


VariantType LogicalExpression::eval() const {
auto left = left_->eval();
auto right = right_->eval();
if (op_ == AND) {
return asBool(left) && asBool(right);
if (!asBool(left_->eval())) {
return false;
}
return asBool(right_->eval());
} else {
return asBool(left) || asBool(right);
if (asBool(left_->eval())) {
return true;
}
return asBool(right_->eval());
}
}

Expand Down

0 comments on commit 2e09077

Please sign in to comment.