From bb38328d39fabe871750a434f51c02c9ba5c3c21 Mon Sep 17 00:00:00 2001 From: Max Wipfli Date: Sun, 23 May 2021 21:27:32 +0200 Subject: [PATCH] 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" --- Userland/Applications/Calculator/Keypad.cpp | 1 + 1 file changed, 1 insertion(+) 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);