diff --git a/5_fix_CountContribution.sol b/5_fix_CountContribution.sol index 9c9c583..d7cea1f 100644 --- a/5_fix_CountContribution.sol +++ b/5_fix_CountContribution.sol @@ -22,6 +22,8 @@ contract CountContribution{ * @param _amount The amount of the contribution. */ function recordContribution(address _user, uint _amount) { + require(contribution[_user] + _amount >= contribution[_user]); + require(totalContributions + _amount >= totalContributions); contribution[_user]+=_amount; totalContributions+=_amount; }