mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
GH-1062: fix integer conversion errors related to Tag subtypes
This commit is contained in:
parent
da105b3bf9
commit
7f2aae1721
3 changed files with 3 additions and 4 deletions
|
@ -692,8 +692,7 @@ expr:
|
|||
else if ( id->IsEnumConst() )
|
||||
{
|
||||
zeek::EnumType* t = id->GetType()->AsEnumType();
|
||||
int intval = t->Lookup(id->ModuleName(),
|
||||
id->Name());
|
||||
auto intval = t->Lookup(id->ModuleName(), id->Name());
|
||||
if ( intval < 0 )
|
||||
reporter->InternalError("enum value not found for %s", id->Name());
|
||||
$$ = new zeek::detail::ConstExpr(t->GetVal(intval));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue