only remove the operator if the value is zero

Co-authored-by: SuIông N. <Boteium@users.noreply.github.com>
This commit is contained in:
Max Friedrich 2023-11-12 20:04:13 +01:00 committed by minacode
parent a3a557fb99
commit 25022004a0

View file

@ -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 '=':