serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibJS: Stop using strtod() since it's not safe on platforms that honor the system locale

Open awesomekling opened this issue 3 years ago • 0 comments

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.

awesomekling avatar Jul 25 '22 20:07 awesomekling