Fix safari zone crash on No Cash (#6132)

This commit is contained in:
DizzyEggg 2025-01-28 13:11:39 +01:00 committed by GitHub
parent f3f03ec43f
commit c77cf8284c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11972,6 +11972,10 @@ void SetShellSideArmCategory(void)
u32 physical;
u32 special;
// Don't run this check for Safari Battles. Because player's stats are zeroed out, this performs division by zero which previously would crash on certain emulators in Safari Zone.
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
return;
for (battlerAtk = 0; battlerAtk < gBattlersCount; battlerAtk++)
{
attackerAtkStat = gBattleMons[battlerAtk].attack;