Skip to content

Commit

Permalink
the negation-operation may cause wrong-build of the AST, that later m…
Browse files Browse the repository at this point in the history
…ay cause a crash.

that operation is missing handling of several operators

Signed-off-by: Gal Salomon <[email protected]>
  • Loading branch information
galsalomon66 committed Jun 12, 2024
1 parent bec2436 commit c84a25d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/s3select.h
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,8 @@ void push_negation::builder(s3select* self, const char* a, const char* b) const
logical_operand* f = S3SELECT_NEW(self, logical_operand, pred);
self->getAction()->exprQ.push_back(f);
}
else if (dynamic_cast<__function*>(pred) || dynamic_cast<negate_function_operation*>(pred) || dynamic_cast<variable*>(pred))
else if (dynamic_cast<__function*>(pred) || dynamic_cast<negate_function_operation*>(pred) || dynamic_cast<variable*>(pred)
|| dynamic_cast<addsub_operation*>(pred) || dynamic_cast<mulldiv_operation*>(pred))
{
negate_function_operation* nf = S3SELECT_NEW(self, negate_function_operation, pred);
self->getAction()->exprQ.push_back(nf);
Expand Down

0 comments on commit c84a25d

Please sign in to comment.