From aec6b3361b3de8391177261469da6edafd39a080 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 13 Feb 2015 12:56:43 +0100 Subject: Fix locale sensitive float parsing/printing. --- src/instrumentparser.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/instrumentparser.cc') 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") { -- cgit v1.2.3