Fix for EnumVal's returning their underlying value

Change EnumVal()->AsEnum() to zeek_int_t.
This commit is contained in:
Vern Paxson 2023-03-08 09:49:59 +01:00 committed by Arne Welzel
parent 802d24cad7
commit b7f7d32bf7
5 changed files with 14 additions and 10 deletions

View file

@ -1336,7 +1336,7 @@ string CPPCompile::GenEnum(const TypePtr& t, const ValPtr& ev)
if ( ! et->HasRedefs() )
// Can use direct access.
return Fmt(v);
return std::to_string(v);
// Need to dynamically map the access.
int mapping_slot;