Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect string assignment, causing 1+2+3 to be parsed as "1", "+", and "2+3" #2

Closed
GoogleCodeExporter opened this issue Aug 16, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Incorrect string assignment, causing 1+2+3 to be parsed as "1", "+", and "2+3". 
Though the RPN part fix this and calculates the correct output.

In
  bool ParserTokenReader::IsValTok(token_type &a_Tok)
the line
        strTok.assign(m_strFormula.c_str(), iStart, m_iPos);
should be
        strTok.assign(m_strFormula.c_str(), iStart, m_iPos-iStart);
.

The string assign function uses count, not a second position:
    _Myt& assign(const _Myt& _Right,
        size_type _Roff, size_type _Count)


Original issue reported on code.google.com by juno.kam...@gmail.com on 25 Nov 2013 at 9:37

@GoogleCodeExporter
Copy link
Author

And some minor typos.
I use Visual Studio Spell Checker, so the red lines helps to detect them ;-) 
explicitely -> explicitly
seperated   -> separated
retriev     -> retrieve
amd         -> and

Original comment by juno.kam...@gmail.com on 25 Nov 2013 at 10:27

@GoogleCodeExporter
Copy link
Author

Fixed in V2.2.4

Original comment by ib...@gmx.info on 27 Nov 2013 at 5:27

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant