Calculator: Fix behavior when entering number starting with decimal

This fixes a bug where entering a number like ".15" would result in "15"
instead of "0.15"
This commit is contained in:
Max Wipfli 2021-05-23 21:27:32 +02:00 committed by Linus Groh
commit bb38328d39
Notes: sideshowbarker 2024-07-18 17:29:12 +09:00

View file

@ -57,6 +57,7 @@ void Keypad::type_decimal_point()
m_int_value = 0;
m_frac_value = 0;
m_frac_length = 0;
m_state = State::TypingDecimal;
break;
case State::TypingInteger:
VERIFY(m_frac_value.value() == 0);