Fix parsing of integers

This bug was seen on 32-bit systems, where the range of recognized values
was less than the range of hexadecimal values.
This commit is contained in:
Daniel Thayer 2012-09-25 15:26:44 -05:00
parent 1044762dfa
commit 6f45a8f4ef

View file

@ -437,7 +437,7 @@ F RET_CONST(new Val(false, TYPE_BOOL))
}
{D} {
RET_CONST(new Val(static_cast<bro_uint_t>(strtoul(yytext, (char**) NULL, 10)),
RET_CONST(new Val(static_cast<bro_uint_t>(strtoull(yytext, (char**) NULL, 10)),
TYPE_COUNT))
}
{FLOAT} RET_CONST(new Val(atof(yytext), TYPE_DOUBLE))