mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 05:35:52 +03: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: https://github.com/SerenityOS/serenity/commit/6cd9906f60b Pull-request: https://github.com/SerenityOS/serenity/pull/7670
@ -190,6 +190,10 @@ public:
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (other == 0) {
|
||||
m_overflow = true;
|
||||
return;
|
||||
}
|
||||
m_value /= other;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user