1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

Calculator: Display zero with only one character

This patch prevents zero to be displayed as "0.00". The value is now
always printed with only one character.
This commit is contained in:
Lucas CHOLLET 2022-01-01 16:16:05 +01:00 committed by Andreas Kling
parent ec28af0aef
commit eb8df0ae2a

View file

@ -10,7 +10,7 @@
KeypadValue::KeypadValue(i64 value, u8 decimal_places) KeypadValue::KeypadValue(i64 value, u8 decimal_places)
: m_value(value) : m_value(value)
, m_decimal_places(decimal_places) , m_decimal_places(value == 0 ? 0 : decimal_places)
{ {
} }