mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
Calculator: Round small number to prevent crash
Small numbers (smaller than 1e-19) can't be displayed in the calculator. They provoke a division by zero in Keypad::set_value(), as 10^20 overflows.
This commit is contained in:
parent
939bf3e864
commit
7532ef78ad
3 changed files with 50 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
class KeypadValue {
|
||||
friend class Keypad;
|
||||
friend class Calculator;
|
||||
|
||||
public:
|
||||
KeypadValue(i64, u8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue