Atof now does not consider ',' as decimal point

This commit is contained in:
Mirek Fidler 2021-11-08 17:59:38 +01:00
parent cab3ac794a
commit ac77bc500e
2 changed files with 2 additions and 2 deletions

View file

@ -260,7 +260,7 @@ namespace std {
#define UPP Upp #define UPP Upp
// #define atof @ // atof is broken, as it depends on setlocale - might want ',' instead of '.' breaking a lot of code // #define atof @ // atof is broken, as it depends on setlocale - might want ',' instead of '.' breaking a lot of code
// Use Atof instead (which accepts both '.' and ',' as decimal separator) // Use Atof instead which is fixed with '.'
namespace Upp { namespace Upp {

View file

@ -660,7 +660,7 @@ double ScanDouble(const wchar *ptr)
double Atof(const char *s) double Atof(const char *s)
{ {
double n; double n;
return ScanDbl<char, byte>(n, s, ',') ? n : 0; return ScanDbl<char, byte>(n, s, 0) ? n : 0;
} }
double CParser::ReadDouble() double CParser::ReadDouble()