mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
parse 64-bit consts correctly.
This commit is contained in:
parent
26f5aee7f6
commit
03f5795095
1 changed files with 2 additions and 2 deletions
|
@ -439,7 +439,7 @@ F RET_CONST(new Val(false, TYPE_BOOL))
|
|||
{D} {
|
||||
// TODO: check if we can use strtoull instead of atol,
|
||||
// and similarly for {HEX}.
|
||||
RET_CONST(new Val(static_cast<unsigned int>(atol(yytext)),
|
||||
RET_CONST(new Val(static_cast<bro_uint_t>(strtoll(yytext, (char**) NULL, 10)),
|
||||
TYPE_COUNT))
|
||||
}
|
||||
{FLOAT} RET_CONST(new Val(atof(yytext), TYPE_DOUBLE))
|
||||
|
@ -483,7 +483,7 @@ F RET_CONST(new Val(false, TYPE_BOOL))
|
|||
|
||||
({D}"."){3}{D} RET_CONST(new AddrVal(yytext))
|
||||
|
||||
"0x"{HEX}+ RET_CONST(new Val(static_cast<bro_uint_t>(strtol(yytext, 0, 16)), TYPE_COUNT))
|
||||
"0x"{HEX}+ RET_CONST(new Val(static_cast<bro_uint_t>(strtoull(yytext, 0, 16)), TYPE_COUNT))
|
||||
|
||||
{H}("."{H})+ RET_CONST(dns_mgr->LookupHost(yytext))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue