There's a situation than can happen, if the first player who joined the raffle wants to know after some time if he is in the raffle, and to know it he wants to use the PuppyRaffle contract instead of looking through his transaction history.
We can use one function to know it, getActivePlayerIndex() but there's a flaw in the function:
If the player passed through the function happens to be in the 0 position in the array, it will have the same result as an address that it's not participating in the raffle
Add a second value (bool) to the return statement that will indicate that is a player in the game. In this way we can differentiate between (0, true) in case of being the first player in the raffle, or (0, false) the player is not in the raffle.
Or
Change the visibility of the function _isActivePlayer to external, to have a definitive way to know is a player is participating in the raffle, and We can at the same time use this function instead of not being use anytime through out the contract.
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.