From 0cabe83e10e27bf7597e099d2c638532d8be669e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 31 Mar 2015 16:13:41 +0300 Subject: [PATCH] Fix for ParserTokenReader::ExtractOperatorToken incorrectly uses ValidInfixOprtChars(). --HG-- branch : develop --- src/libs/qmuparser/qmuparsertokenreader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/qmuparser/qmuparsertokenreader.cpp b/src/libs/qmuparser/qmuparsertokenreader.cpp index f476d2140..0bf24a1d7 100644 --- a/src/libs/qmuparser/qmuparsertokenreader.cpp +++ b/src/libs/qmuparser/qmuparsertokenreader.cpp @@ -343,7 +343,8 @@ int QmuParserTokenReader::ExtractToken ( const QString &a_szCharSet, QString &a_ int QmuParserTokenReader::ExtractOperatorToken ( QString &a_sTok, int a_iPos ) const { const std::wstring m_strFormulaStd = m_strFormula.toStdWString(); - const std::wstring oprtCharsStd = m_pParser->ValidInfixOprtChars().toStdWString(); + // Changed as per Issue 6: https://code.google.com/p/muparser/issues/detail?id=6 + const std::wstring oprtCharsStd = m_pParser->ValidOprtChars().toStdWString(); int iEnd = static_cast( m_strFormulaStd.find_first_not_of ( oprtCharsStd, static_cast(a_iPos) ) ); if ( iEnd == static_cast( string_type::npos ) )