The function getActivePlayerIndex will not give accurate result if the player doesn't exist.
If a player is not active then it returns 0, which will pretend to caller that the player is active and index is 0.
Manual Review
So, if a player is not active then it should revert with an error that the player doesn't exist instead of returning 0, which seems to misguide the caller.
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.