Closed code423n4 closed 3 years ago
cmichel
The if (ceiling <= supply) continue; can be removed as the statement that follows already covers this case and more: if (supply + amount > ceiling) continue;. If ceiling <= supply then ceiling < supply + amount (as amount > 0).
if (ceiling <= supply) continue;
if (supply + amount > ceiling) continue;
ceiling <= supply
ceiling < supply + amount
amount > 0
Duplicate of #29
Handle
cmichel
Vulnerability details
The
if (ceiling <= supply) continue;
can be removed as the statement that follows already covers this case and more:if (supply + amount > ceiling) continue;
. Ifceiling <= supply
thenceiling < supply + amount
(asamount > 0
).