mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fix for '?' operator precedence when compiling scripts to C++
This commit is contained in:
parent
b25a844210
commit
6a9175da7d
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ string CPPCompile::GenCondExpr(const Expr* e, GenType gt) {
|
|||
if ( op1->GetType()->Tag() == TYPE_VECTOR )
|
||||
return string("vector_select__CPP(") + gen1 + ", " + gen2 + ", " + gen3 + ")";
|
||||
|
||||
return string("(") + gen1 + ") ? (" + gen2 + ") : (" + gen3 + ")";
|
||||
return string("((") + gen1 + ") ? (" + gen2 + ") : (" + gen3 + "))";
|
||||
}
|
||||
|
||||
string CPPCompile::GenCallExpr(const CallExpr* c, GenType gt, bool top_level) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue