mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Merge 72f78fac7d
into 8b4707a284
This commit is contained in:
commit
c78c168046
1 changed files with 4 additions and 1 deletions
|
@ -1700,8 +1700,11 @@ void EnumType::AddNameInternal(const string& full_name, zeek_int_t val) {
|
||||||
names[full_name] = val;
|
names[full_name] = val;
|
||||||
rev_names[val] = full_name;
|
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);
|
vals[val] = make_intrusive<EnumVal>(IntrusivePtr{NewRef{}, this}, val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
zeek_int_t EnumType::Lookup(const string& module_name, const char* name) const {
|
zeek_int_t EnumType::Lookup(const string& module_name, const char* name) const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue