mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
porting of GH-4022
This commit is contained in:
parent
c86f9267ff
commit
f693f22192
4 changed files with 40 additions and 14 deletions
|
@ -3241,10 +3241,11 @@ bool VectorVal::Assign(unsigned int index, ValPtr element) {
|
|||
|
||||
if ( yield_types ) {
|
||||
const auto& t = element->GetType();
|
||||
(*yield_types)[index] = t;
|
||||
auto& yt_i = (*yield_types)[index];
|
||||
auto& elem = vector_val[index];
|
||||
if ( elem )
|
||||
ZVal::DeleteIfManaged(*elem, t);
|
||||
ZVal::DeleteIfManaged(*elem, yt_i);
|
||||
yt_i = t;
|
||||
elem = ZVal(std::move(element), t);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue