Function getActivePlayerIndex will return wrong value if parameter is either address(0) or address that is not in the players array.
If the parameter player is address(0) or address that is not in the players array, the function will return 0. This will be invalid because the player at index 0 is different.
Wrong return value.
Manual Review
I think the best solution for this will be to return index that is outside of the array
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.