mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
Atof now does not consider ',' as decimal point
This commit is contained in:
parent
cab3ac794a
commit
ac77bc500e
2 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue