Closed Dexaran closed 7 years ago
Adding to this, there are many other cases where SafeAdd and SafeSub are not used:
Using -
instead of safeSub
:
Using +
instead of safeAdd
:
@pyskell can you please give a line detailed list from that? Thank you!
I can't do that easily from my machine at the moment, this is basically a quick search of every place that contains the following operators: -
--
-=
+
++
+=
All of which should be able to be replaced with safeSub
and safeAdd
.
There is no check for overflow: https://github.com/CORIONplatform/solidity/blob/master/schelling.sol#L154
Why not to use
SafeMath
here also?