mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
crash fixes for constructs that expect add/delete expressions to return values
This commit is contained in:
parent
c6011e2160
commit
fe5c953d31
4 changed files with 22 additions and 5 deletions
|
@ -730,9 +730,10 @@ ExprPtr AddExpr::BuildSub(const ExprPtr& op1, const ExprPtr& op2) {
|
|||
}
|
||||
|
||||
ExprPtr AggrAddDelExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
|
||||
if ( type )
|
||||
return UnaryExpr::Reduce(c, red_stmt);
|
||||
|
||||
// In the future, if we use add/delete for list operations or such,
|
||||
// then the following becomes germane.
|
||||
// if ( type )
|
||||
// return UnaryExpr::Reduce(c, red_stmt);
|
||||
if ( c->Optimizing() )
|
||||
op = c->UpdateExpr(op);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue