Fix memory corruption when handling the ultra burst trigger sprite

This commit is contained in:
kittenchilly 2023-08-17 13:29:04 -05:00
parent f95b4fdb4c
commit 4e0e70ae81

View File

@ -1596,11 +1596,11 @@ bool32 IsBurstTriggerSpriteActive(void)
void HideBurstTriggerSprite(void)
{
if (gBattleStruct->burst.triggerSpriteId != 0xFF)
{
ChangeBurstTriggerSprite(gBattleStruct->burst.triggerSpriteId, 0);
gSprites[gBattleStruct->burst.triggerSpriteId].tHide = TRUE;
}
if (gBattleStruct->burst.triggerSpriteId >= MAX_SPRITES)
return;
ChangeBurstTriggerSprite(gBattleStruct->burst.triggerSpriteId, 0);
gSprites[gBattleStruct->burst.triggerSpriteId].tHide = TRUE;
}
void DestroyBurstTriggerSprite(void)