getActivePlayerIndex is not able to recognize (active | not active) player at index 0.
This will mislead players who wanted to know their index.
Manual review
We can return a -1 for inactive players as we expect a unsigned integer value to retrieve a player's address from players array and upto my knowing last value can't be retrieved using -1 from an array in solidity?!. So, That will not raise any issue.
take a look on a solution...👇
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.