Fix SimpleLexer not recognizing negative numbers

This commit is contained in:
Jan
2021-11-14 20:04:00 +01:00
parent 18aa914d70
commit ebb8eb9e5b
3 changed files with 5 additions and 3 deletions

View File

@ -120,7 +120,7 @@ SimpleParserValue SimpleLexer::GetNextToken()
if (m_config.m_read_strings && c == '\"')
return SimpleParserValue::String(pos, new std::string(ReadString()));
if (m_config.m_read_numbers && (isdigit(c) || c == '.' && isdigit(PeekChar())))
if (m_config.m_read_numbers && (isdigit(c) || (c == '-' || c == '.') && isdigit(PeekChar())))
{
bool isFloatingPointValue;
double doubleValue;