From c952dd8a6e1837ebfbcb5ade04f7d66cefa38cbd Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 23 Aug 2020 02:08:04 +0200 Subject: [PATCH] Fix fixed-point constants not working correctly And added a test to check their behavior --- src/asm/lexer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/asm/lexer.c b/src/asm/lexer.c index e2a0636e..b5a88129 100644 --- a/src/asm/lexer.c +++ b/src/asm/lexer.c @@ -965,6 +965,7 @@ static void readFractionalPart(void) break; } value = value * 10 + (c - '0'); + divisor *= 10; } if (yylval.nConstValue > INT16_MAX || yylval.nConstValue < INT16_MIN)