diff --git a/contracts/crowdsale/CappedCrowdsale.sol b/contracts/crowdsale/CappedCrowdsale.sol index 622000ffd..3fe7b9f32 100644 --- a/contracts/crowdsale/CappedCrowdsale.sol +++ b/contracts/crowdsale/CappedCrowdsale.sol @@ -22,14 +22,14 @@ contract CappedCrowdsale is Crowdsale { // @return true if crowdsale event has ended function hasEnded() public view returns (bool) { bool capReached = weiRaised >= cap; - return super.hasEnded() || capReached; + return capReached || super.hasEnded(); } // overriding Crowdsale#validPurchase to add extra cap logic // @return true if investors can buy at the moment function validPurchase() internal view returns (bool) { bool withinCap = weiRaised.add(msg.value) <= cap; - return super.validPurchase() && withinCap; + return withinCap && super.validPurchase(); } }