diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-02-13 12:56:43 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-02-13 12:56:43 +0100 |
commit | aec6b3361b3de8391177261469da6edafd39a080 (patch) | |
tree | c52a9a63dc078fbd0c8ee209eed03f8fe5655b7a /src/instrumentparser.cc | |
parent | 1971b7c898f710df4d66e0a70e2ec707ab6e18fd (diff) |
Fix locale sensitive float parsing/printing.
Diffstat (limited to 'src/instrumentparser.cc')
-rw-r--r-- | src/instrumentparser.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index 0889d74..1f25bc7 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -33,6 +33,8 @@ #include "path.h" +#include "nolocale.h" + InstrumentParser::InstrumentParser(const std::string &file, Instrument &i) : instrument(i) { @@ -84,7 +86,7 @@ void InstrumentParser::startTag(std::string name, if(attr.find("power") == attr.end()) { power = -1; } else { - power = atof(attr["power"].c_str()); + power = atof_nol(attr["power"].c_str()); DEBUG(instrparser, "Instrument power set to %f\n", power); } @@ -136,8 +138,8 @@ void InstrumentParser::startTag(std::string name, return; } - lower = atof(attr["lower"].c_str()); - upper = atof(attr["upper"].c_str()); + lower = atof_nol(attr["lower"].c_str()); + upper = atof_nol(attr["upper"].c_str()); } if(name == "sampleref") { |