fix for adding a non-managed type to an empty vector

This commit is contained in:
Vern Paxson 2022-01-12 09:39:02 -08:00
parent 2accf6dfbf
commit 57f6487111

View file

@ -3236,9 +3236,12 @@ bool VectorVal::CheckElementType(const ValPtr& element)
int n = vector_val->size(); int n = vector_val->size();
if ( n == 0 ) if ( n == 0 )
{
// First addition to an empty vector-of-any, perhaps // First addition to an empty vector-of-any, perhaps
// it will be homogeneous. // it will be homogeneous.
yield_type = element->GetType(); yield_type = element->GetType();
managed_yield = ZVal::IsManagedType(yield_type);
}
else else
{ {