Fix fixed-point constants not working correctly

And added a test to check their behavior
This commit is contained in:
ISSOtm
2020-08-23 02:08:04 +02:00
parent b65ea64a58
commit c952dd8a6e

View File

@@ -965,6 +965,7 @@ static void readFractionalPart(void)
break; break;
} }
value = value * 10 + (c - '0'); value = value * 10 + (c - '0');
divisor *= 10;
} }
if (yylval.nConstValue > INT16_MAX || yylval.nConstValue < INT16_MIN) if (yylval.nConstValue > INT16_MAX || yylval.nConstValue < INT16_MIN)