The getActivePlayerIndex function returns 0 if a player isn't found in the active player array players
. However, if the function is called with the address of the first person in that array, it will also return index 0, resulting in Schrödinger's player.
Given the function above, the results of this test don't tell us anything - is playerOne, in the raffle, or out?
Player in index 0 of the players[] array can never be sure if they are in or out of the raffle.
Foundry
Manual Review
Implement a revert if the provided address is not found:
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.