In the case that no voter did submit a vote during the presidentialDuration (1460 days), the function selectPresident will revert and the whole smart contract becomes unusuable.
In the selectPresidentRecursive function, there is no check if the array s_candidateList is empty. This should in theory not happen given the timeframe of the presidentialDuration, but should still be check nevertheless. If the duration is over and no one voted, the smart contract is broken and no more presidents can be chosen.
The smart contracts stops working as no one can vote or choose a president.
Forge
Add a check in selectPresidentRecursive to verify if s_candidateList is empty or not. If it's empty, return the current president (as this would probably mean that everyone is fine with the status quo, hence no one submitted a vote) :
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.