From ed5ed043cde2e8e8d0530a4c9b76a3fa2b4d77cf Mon Sep 17 00:00:00 2001 From: Ingo Berg <2202567+beltoforion@users.noreply.github.com> Date: Sun, 24 Dec 2023 00:59:43 +0100 Subject: [PATCH] Update muParser.cpp --- src/muParser.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/muParser.cpp b/src/muParser.cpp index d40e5e0..aead7d5 100644 --- a/src/muParser.cpp +++ b/src/muParser.cpp @@ -54,7 +54,8 @@ namespace mu */ int Parser::IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal) { -/* +/* // 2023-12-23 Issue #136: This code breaks localization! + // fix for #123; std::Stringstream is broken on Mac; use std::stod instead try { @@ -75,8 +76,8 @@ namespace mu value_type fVal(0); - stringstream_type stream(a_szExpr); -// stream.seekg(0); // todo: check if this really is necessary +// stringstream_type stream(a_szExpr); + std::istringstream stream(a_szExpr); stream.imbue(Parser::s_locale); stream >> fVal; stringstream_type::pos_type iEnd = stream.tellg(); // Position after reading