serenity
serenity copied to clipboard
LibJS: Stop using strtod() since it's not safe on platforms that honor the system locale
The number 1.5 will parse as 1 in LibJS on systems where the current locale uses , as a decimal separator.
I noticed this when running Ladybird on Linux, where I had LC_NUMERIC=sv_SE.UTF-8 set.
LibJS uses strtod() in a number of places, and we'll want to switch them all to do locale-agnostic parsing.