mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
GH-839: Fix use of &optional sub-records within table/set indices
This commit is contained in:
parent
5f57daf9d1
commit
77f1ede661
3 changed files with 56 additions and 0 deletions
|
@ -509,6 +509,9 @@ int CompositeHash::SingleTypeKeySize(Type* bt, const Val* v,
|
|||
|
||||
case TYPE_RECORD:
|
||||
{
|
||||
if ( ! v )
|
||||
return (optional && ! calc_static_size) ? sz : 0;
|
||||
|
||||
const RecordVal* rv = v ? v->AsRecordVal() : nullptr;
|
||||
RecordType* rt = bt->AsRecordType();
|
||||
int num_fields = rt->NumFields();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue