mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
bug fix for vector slice assignment
This commit is contained in:
parent
3d9d6e953b
commit
63bfae180a
1 changed files with 1 additions and 10 deletions
11
src/Val.cc
11
src/Val.cc
|
@ -3323,20 +3323,11 @@ bool VectorVal::Insert(unsigned int index, ValPtr element)
|
|||
auto n = vector_val->size();
|
||||
|
||||
if ( index < n )
|
||||
{ // May need to delete previous element
|
||||
{ // Find location within existing vector elements.
|
||||
it = std::next(vector_val->begin(), index);
|
||||
if ( yield_types )
|
||||
{
|
||||
if ( *it )
|
||||
ZVal::DeleteIfManaged(**it, element->GetType());
|
||||
types_it = std::next(yield_types->begin(), index);
|
||||
}
|
||||
else if ( managed_yield )
|
||||
{
|
||||
if ( *it )
|
||||
ZVal::DeleteManagedType(**it);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
it = vector_val->end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue