getActivePlayerIndex()
returns 0
in two different cases.
In one case 0
is returned when the first player has the address equal to the function's argument. In another case 0
is returned when no elements are found.
Low. The usage of this method can lead to unexpected bugs where extra debugging is required. However, the function is not used anywhere in the contract.
Manual check.
It's better to start with players[]
and rewrite the contract, so that the mapping is used instead of array. Mapping will help to resolve current and some other issues.
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.