diff --git a/contracts/BIFI/infra/BeefyRewardPool.sol b/contracts/BIFI/infra/BeefyRewardPool.sol index fe7a1e6c..5ea7cb63 100644 --- a/contracts/BIFI/infra/BeefyRewardPool.sol +++ b/contracts/BIFI/infra/BeefyRewardPool.sol @@ -135,9 +135,9 @@ contract BeefyRewardPool is LPTokenWrapperInitializable, OwnableUpgradeable { if (_reward == address(stakedToken)) revert StakedTokenIsNotAReward(); if (_duration < 1 days) revert ShortDuration(); if (_reward != rewardTokens[rewardTokenIndex[_reward]]) { - if (rewardTokens.length > rewardMax - 1) revert TooManyRewards(); rewardTokenIndex[_reward] = rewardTokens.length; rewardTokens.push(_reward); + if (rewardTokens.length > rewardMax) revert TooManyRewards(); } uint256 leftover;