Skip to content

Commit

Permalink
only remove the operator if the value is zero
Browse files Browse the repository at this point in the history
Co-authored-by: SuIông N. <[email protected]>
  • Loading branch information
minacode and Boteium authored Nov 12, 2023
1 parent f51bd25 commit 453e751
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/displayapp/screens/Calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ void Calculator::HandleInput() {
NRF_LOG_INFO(". value: %" PRId64, value);
NRF_LOG_INFO(". result: %" PRId64, result);

operation = ' ';
UpdateOperation();
if (value == 0) {
operation = ' ';
UpdateOperation();
}
break;

case '=':
Expand Down

0 comments on commit 453e751

Please sign in to comment.