mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
fixed bug where appending an empty vector to a vector-of-vector's had no effect
This commit is contained in:
parent
8b214862c5
commit
54877e9dec
6 changed files with 53 additions and 7 deletions
|
@ -481,10 +481,10 @@ string CPPCompile::GenAddToExpr(const Expr* e, GenType gt, bool top_level) {
|
|||
if ( t->Tag() == TYPE_VECTOR ) {
|
||||
auto& rt = rhs->GetType();
|
||||
|
||||
if ( IsVector(rt->Tag()) && same_type(lhs->GetType(), rt) )
|
||||
add_to_func = "vector_vec_append__CPP";
|
||||
else
|
||||
if ( e->AsAddToExpr()->IsVectorElemAppend() )
|
||||
add_to_func = "vector_append__CPP";
|
||||
else
|
||||
add_to_func = "vector_vec_append__CPP";
|
||||
}
|
||||
|
||||
else if ( t->Tag() == TYPE_PATTERN )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue