Merge branch 'hotfix/Fix_Integer_Overflow/Underflow'
This commit is contained in:
commit
bcf24dfb70
|
@ -156,6 +156,8 @@ contract DECA is ERC20, Ownable {
|
||||||
//Add weeks in case ICO gets not enough funds
|
//Add weeks in case ICO gets not enough funds
|
||||||
function appendWeeks(uint addWeeks ) public onlyOwner {
|
function appendWeeks(uint addWeeks ) public onlyOwner {
|
||||||
require(now >= bonus2Ends && now < endDate);
|
require(now >= bonus2Ends && now < endDate);
|
||||||
|
// Fix Integer Overflow / Underflow
|
||||||
|
require(endDate < (endDate + (addWeeks * 1 weeks)));
|
||||||
// add weeks to the endDate
|
// add weeks to the endDate
|
||||||
endDate += (addWeeks * 1 weeks);
|
endDate += (addWeeks * 1 weeks);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue