mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge 72f78fac7d
into 8b4707a284
This commit is contained in:
commit
c78c168046
1 changed files with 4 additions and 1 deletions
|
@ -1700,9 +1700,12 @@ void EnumType::AddNameInternal(const string& full_name, zeek_int_t val) {
|
|||
names[full_name] = val;
|
||||
rev_names[val] = full_name;
|
||||
|
||||
if ( ! vals.contains(val) )
|
||||
if ( ! vals.contains(val) ) {
|
||||
if ( counter >= 0 && val == static_cast<zeek_int_t>(vals.size()) )
|
||||
++counter;
|
||||
vals[val] = make_intrusive<EnumVal>(IntrusivePtr{NewRef{}, this}, val);
|
||||
}
|
||||
}
|
||||
|
||||
zeek_int_t EnumType::Lookup(const string& module_name, const char* name) const {
|
||||
return Lookup(detail::make_full_var_name(module_name.c_str(), name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue