Remove potential uninitialized behavior (#5393)

`MAX_BATTLERS_COUNT` makes more sense to use here because we iterate over max battlers in the first place.
This commit is contained in:
Alex 2024-09-17 20:58:43 +02:00 committed by GitHub
parent 6116b8b04e
commit 95dac7c4ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8935,7 +8935,7 @@ static bool32 ChangeOrderTargetAfterAttacker(void)
|| GetBattlerTurnOrderNum(gBattlerAttacker) + 1 == GetBattlerTurnOrderNum(gBattlerTarget))
return FALSE;
for (i = 0; i < gBattlersCount; i++)
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
data[i] = gBattlerByTurnOrder[i];
actionsData[i] = gActionsByTurnOrder[i];