mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
Use 64 bit integers (if available) when int is not big enough
This commit is contained in:
@@ -566,7 +566,20 @@ void Parser::readValue(const Token* token)
|
||||
case Token::INTEGER_LITERAL_TOKEN:
|
||||
if ( _handler != NULL )
|
||||
{
|
||||
_handler->value(token->asInteger());
|
||||
int value = token->asInteger();
|
||||
#if defined(POCO_HAVE_INT64)
|
||||
if ( value == std::numeric_limits<int>::max()
|
||||
|| value == std::numeric_limits<int>::min() )
|
||||
{
|
||||
_handler->value(NumberParser::parse64(token->asString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
_handler->value(token->asInteger());
|
||||
}
|
||||
#else
|
||||
_handle->value(value);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case Token::KEYWORD_TOKEN:
|
||||
|
||||
Reference in New Issue
Block a user