From 92d6d97c654391a82fba605b2af29e2aa99bdc00 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sat, 1 Jan 2022 22:13:53 +1030 Subject: Fix party size calculations for larger-than-six PARTY_SIZE --- src/pokemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pokemon.c b/src/pokemon.c index 0bbb9f81e..01b06a1af 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3675,7 +3675,7 @@ u8 CalculatePlayerPartyCount(void) { gPlayerPartyCount = 0; - while (gPlayerPartyCount < 6 + while (gPlayerPartyCount < PARTY_SIZE && GetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) { gPlayerPartyCount++; @@ -3689,7 +3689,7 @@ u8 CalculateEnemyPartyCount(void) { gEnemyPartyCount = 0; - while (gEnemyPartyCount < 6 + while (gEnemyPartyCount < PARTY_SIZE && GetMonData(&gEnemyParty[gEnemyPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) { gEnemyPartyCount++; -- cgit v1.2.3