diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-05-23 21:27:32 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-23 23:18:54 +0100 |
commit | bb38328d39fabe871750a434f51c02c9ba5c3c21 (patch) | |
tree | 90e384831c8f2d98b41ebff43ca3000bd9bccdb4 /Userland/Applications/Calculator | |
parent | 7b53ca5309e92414fa06867351b11de32913dc67 (diff) | |
download | serenity-bb38328d39fabe871750a434f51c02c9ba5c3c21.zip |
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"
Diffstat (limited to 'Userland/Applications/Calculator')
-rw-r--r-- | Userland/Applications/Calculator/Keypad.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/Calculator/Keypad.cpp b/Userland/Applications/Calculator/Keypad.cpp index 48cd3568d0..4a66474413 100644 --- a/Userland/Applications/Calculator/Keypad.cpp +++ b/Userland/Applications/Calculator/Keypad.cpp @@ -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); |