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

[Bugfix] Parsing of negative numbers got confused by (multiple) arguments #5205

Open
wants to merge 3 commits into
base: mega
Choose a base branch
from

Conversation

tonhuisman
Copy link
Contributor

@tonhuisman tonhuisman commented Jan 1, 2025

Resolves #5204

Bugfix:

  • Parsing of negative values during calculation could get confused when multiple arguments are available.
  • Processing of the RPN cache is revisited. (Work in progress)

TODO:

  • Testing by reporter.
  • More testing.

@tonhuisman
Copy link
Contributor Author

@chromoxdor This fix should resolve parsing negative values during calculations with multiple arguments provided. Can you please test?

The confusion was mostly caused by the argument separator : not being handled explicitly. A few extra resets, and checking for the reset character, fixes that.

@chromoxdor
Copy link
Contributor

@chromoxdor This fix should resolve parsing negative values during calculations with multiple arguments provided. Can you please test?

Great.. looks good so far. I didn´t test every possible combination but i guess you fixed it. :)

// 2 * / % left to right
// 1 + - ^ left to right
// 1 + - left to right
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that was an odd bug. Strange it wasn't discovered before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a difference in documentation between the .h and .cpp file. Assumed the most info was most accurate, but obviously something was lost here.

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

Successfully merging this pull request may close these issues.

[BUG] map does not handle negative values
3 participants