AK: Make checked division also check for divide by zero

This commit is contained in:
Ali Mohammad Pur 2021-06-01 21:48:36 +04:30 committed by Ali Mohammad Pur
parent 9a1853c388
commit 6cd9906f60
Notes: sideshowbarker 2024-07-18 17:01:13 +09:00

View File

@ -190,6 +190,10 @@ public:
return;
}
}
if (other == 0) {
m_overflow = true;
return;
}
m_value /= other;
}