mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
Casting a floating point number to an integer and comparing that against the original value is not a good way to test if it is a whole number. It may cause unnecessary narrowing conversion issues and UB. This was the case, which was caught be Clang's `-fsanitize=float-cast-overflow`. This commit changes the code to use `is_integral_number`, as suggested in ECMA-262.
5.1 KiB
5.1 KiB