mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Fix copy() to work with a vector that has trailing holes
Previously, the trailing holes would not be preserved in the copy.
This commit is contained in:
parent
d00748a2e7
commit
819fc1aac0
3 changed files with 7 additions and 2 deletions
|
@ -3706,8 +3706,7 @@ ValPtr VectorVal::DoClone(CloneState* state)
|
|||
for ( auto i = 0; i < n; ++i )
|
||||
{
|
||||
auto elem = At(i);
|
||||
if ( elem )
|
||||
vv->Assign(i, elem->Clone(state));
|
||||
vv->Assign(i, elem ? elem->Clone(state) : nullptr);
|
||||
}
|
||||
|
||||
return vv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue