From 705eefc1f099f652dedc5645808d798d5d3d46d7 Mon Sep 17 00:00:00 2001 From: louis Date: Mon, 26 Jan 2015 17:10:17 +0100 Subject: fixed Bug that double vars were not handled correctly --- libtemplate/globals.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libtemplate') diff --git a/libtemplate/globals.c b/libtemplate/globals.c index 36e2c19..1ce7502 100644 --- a/libtemplate/globals.c +++ b/libtemplate/globals.c @@ -112,6 +112,11 @@ void cGlobals::ReplaceDoubleVars(string &value) { stringstream st; st << it->second; string doubleVal = st.str(); + if (config.replaceDecPoint) { + if (doubleVal.find_first_of('.') != string::npos) { + std::replace( doubleVal.begin(), doubleVal.end(), '.', config.decPoint); + } + } value = value.replace(foundToken, token.size(), doubleVal); } } -- cgit v1.2.3