Fix for ParserTokenReader::ExtractOperatorToken incorrectly uses

ValidInfixOprtChars().

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-03-31 16:13:41 +03:00
parent aef39533c8
commit 0cabe83e10

View File

@ -343,7 +343,8 @@ int QmuParserTokenReader::ExtractToken ( const QString &a_szCharSet, QString &a_
int QmuParserTokenReader::ExtractOperatorToken ( QString &a_sTok, int a_iPos ) const int QmuParserTokenReader::ExtractOperatorToken ( QString &a_sTok, int a_iPos ) const
{ {
const std::wstring m_strFormulaStd = m_strFormula.toStdWString(); 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<int>( m_strFormulaStd.find_first_not_of ( oprtCharsStd, static_cast<std::size_t>(a_iPos) ) ); int iEnd = static_cast<int>( m_strFormulaStd.find_first_not_of ( oprtCharsStd, static_cast<std::size_t>(a_iPos) ) );
if ( iEnd == static_cast<int>( string_type::npos ) ) if ( iEnd == static_cast<int>( string_type::npos ) )