Fix BtlController_EmitChosenMonReturnValue UB (#7197)
This commit is contained in:
parent
bc95824e8c
commit
93511ceb05
@ -1415,8 +1415,11 @@ void BtlController_EmitChosenMonReturnValue(u32 battler, u32 bufferId, u8 partyI
|
||||
|
||||
gBattleResources->transferBuffer[0] = CONTROLLER_CHOSENMONRETURNVALUE;
|
||||
gBattleResources->transferBuffer[1] = partyId;
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
gBattleResources->transferBuffer[2 + i] = battlePartyOrder[i];
|
||||
if (battlePartyOrder != NULL)
|
||||
{
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
gBattleResources->transferBuffer[2 + i] = battlePartyOrder[i];
|
||||
}
|
||||
PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 5);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user