mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 13:32:23 +00:00
AK: Make checked division also check for divide by zero
This commit is contained in:
parent
9a1853c388
commit
6cd9906f60
Notes:
sideshowbarker
2024-07-18 17:01:13 +09:00
Author: https://github.com/alimpfard
Commit: 6cd9906f60
Pull-request: https://github.com/SerenityOS/serenity/pull/7670
1 changed files with 4 additions and 0 deletions
|
@ -190,6 +190,10 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (other == 0) {
|
||||||
|
m_overflow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_value /= other;
|
m_value /= other;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue