-Fixed double parsing bug

This commit is contained in:
James Newton-King
2016-09-11 17:06:53 +12:00
parent 304136a60e
commit ca3af212de
2 changed files with 10 additions and 8 deletions
@@ -1318,17 +1318,17 @@ namespace Newtonsoft.Json.Utilities
i++;
if (i != end)
{
if (chars[i] != '.')
c = chars[i];
if (c == '.')
{
return ParseResult.Invalid;
goto case '.';
}
if (i + 1 == end)
if (c == 'e' || c == 'E')
{
return ParseResult.Invalid;
goto case 'E';
}
numDecimalStart = i + 1;
continue;
return ParseResult.Invalid;
}
}