Skip to content

Fix bug when the negate sign is before a space #345

Merged
joseartrivera merged 3 commits intomicrosoft:masterfrom
rudyhuyn:Fix294
Apr 26, 2019
Merged

Fix bug when the negate sign is before a space #345
joseartrivera merged 3 commits intomicrosoft:masterfrom
rudyhuyn:Fix294

Conversation

@rudyhuyn
Copy link
Copy Markdown
Contributor

@rudyhuyn rudyhuyn commented Mar 20, 2019

Fixes #294

Description of the changes:

Ignore None characters while parsing the clipboard, so '4--6' would be correctly interpreted.

The issue was that isPreviousOperator was set to Falsebecause of the space character, ignore it solve the issue.

How changes were validated:

  • tested with different values

updatedToken = CCalcEngine::OpCodeToUnaryString(static_cast<int>(Command::CommandLN), true, angleType);
break;
default:
updatedToken = CCalcEngine::OpCodeToUnaryString(nOpCode, false, angleType);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

something screwed up the indentation of this switch-case

joseartrivera
joseartrivera previously approved these changes Apr 1, 2019
Copy link
Copy Markdown
Contributor

@joseartrivera joseartrivera left a comment

Choose a reason for hiding this comment

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

The change looks good to me and functions correctly. Thanks for fixing this! Just need to adjust the formatting as mentioned earlier by @mauve

@joseartrivera
Copy link
Copy Markdown
Contributor

Hey @rudyhuyn I signed off on this, but could you fix the formatting before I merge it in?

Thanks!

@joseartrivera joseartrivera merged commit 9728ccf into microsoft:master Apr 26, 2019
EriWong pushed a commit to EriWong/calculator that referenced this pull request Jun 5, 2019
* Ignore None characters while parsing the clipboard

* reformat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minus a negative number isn't interpreted correctly in scientific mode

4 participants