Skip to content

Commit

Permalink
XS: fix issue #59
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Soquet authored and mkellner committed Oct 11, 2018
1 parent cfd1da5 commit af3c8a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xs/sources/xsLexical.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ void fxGetNextNumberE(txParser* parser, int parseDot)
*p++ = '.';
}
if ((parser->character == 'e') || (parser->character == 'E')) {
int i = 0;
*p++ = '0';
*p++ = (char)parser->character;
fxGetNextCharacter(parser);
Expand All @@ -303,7 +304,10 @@ void fxGetNextNumberE(txParser* parser, int parseDot)
while (('0' <= parser->character) && (parser->character <= '9')) {
*p++ = (char)parser->character;
fxGetNextCharacter(parser);
i++;
}
if (i == 0)
fxReportParserError(parser, "invalid number");
}
*p++ = 0;
fxGetNextNumber(parser, fxStringToNumber(parser->dtoa, parser->buffer, 1));
Expand Down

0 comments on commit af3c8a5

Please sign in to comment.