mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
AK: Make checked division also check for divide by zero
This commit is contained in:
parent
9a1853c388
commit
6cd9906f60
|
@ -190,6 +190,10 @@ public:
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (other == 0) {
|
||||
m_overflow = true;
|
||||
return;
|
||||
}
|
||||
m_value /= other;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue