getActivePlayerIndex returns 0 index for non active players
getActivePlayerIndex function returns 0 if the player not found in the players array. But in case the player is active and his index is 0 the function will return 0 as well
This could make a confusion for players if they are active or their index is 0.
manual review
It will be better to use modify the _isActivePlayer to take an address as argument and return a boolean value representing the activity of the player. Then use it as a checking statement in the getActivePlayerIndex function before iterating through the players array like so :
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.