From 7441a0947cada8534adf48fa41e2d4471dfdeffc Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Thu, 8 Jul 2021 00:16:30 +0000 Subject: Implement the full arithmetic part of the ISO spec. --- parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parser.c') diff --git a/parser.c b/parser.c index c0ac1d8..9b16063 100644 --- a/parser.c +++ b/parser.c @@ -536,8 +536,10 @@ SkipWhite: goto Integer; } while(isdigitrune(peek)){ - numD += (peek - L'0') / (double)(10 * place); + double addition = (peek - L'0') / (double)(10 * place); + numD += addition; peek = Bgetrune(parsein); + place *= 10; } Bungetrune(parsein); /* Should also lex 123.45E10 */ -- cgit v1.2.3