1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

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
parent 7b53ca5309
commit bb38328d39

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);