mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:07:46 +00:00
AK: Make checked division also check for divide by zero
This commit is contained in:
parent
9a1853c388
commit
6cd9906f60
1 changed files with 4 additions and 0 deletions
|
@ -190,6 +190,10 @@ public:
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (other == 0) {
|
||||
m_overflow = true;
|
||||
return;
|
||||
}
|
||||
m_value /= other;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue