mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Fix indexing of set/table types with a vector
Previous behavor: internal error: bad index type in CompositeHash::ComputeSingletonHash Aborted (core dumped)
This commit is contained in:
parent
fc3438bda5
commit
735ac0b4fa
3 changed files with 45 additions and 2 deletions
|
@ -22,12 +22,13 @@ CompositeHash::CompositeHash(TypeListPtr composite_type)
|
|||
{
|
||||
singleton_tag = TYPE_INTERNAL_ERROR;
|
||||
|
||||
// If the only element is a record, don't treat it as a
|
||||
// If the only element is a record or vector, don't treat it as a
|
||||
// singleton, since it needs to be evaluated specially.
|
||||
|
||||
if ( type->GetTypes().size() == 1 )
|
||||
{
|
||||
if ( type->GetTypes()[0]->Tag() == TYPE_RECORD )
|
||||
if ( type->GetTypes()[0]->Tag() == TYPE_RECORD ||
|
||||
type->GetTypes()[0]->Tag() == TYPE_VECTOR)
|
||||
{
|
||||
is_complex_type = true;
|
||||
is_singleton = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue