summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
authorhjk321 <anderdude@outlook.com>2021-02-22 10:04:27 -0600
committerhjk321 <anderdude@outlook.com>2021-02-22 10:04:27 -0600
commitfc16ee9498c8283a2bb520f524409999ba27612b (patch)
treee28c8c8f43a268059b3fb51047c4bd36a954a5a9 /src/pokemon.c
parent33126a06331f8afce668a1152a26e9ed6f5d9a16 (diff)
Fix storage magic numbers
I could *kinda* understand missing SendMonToPc, but IN THE STRUCT ITSELF?!
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index c0960f552..f58aee9b3 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -3646,7 +3646,7 @@ static u8 SendMonToPC(struct Pokemon* mon)
do
{
- for (boxPos = 0; boxPos < 30; boxPos++)
+ for (boxPos = 0; boxPos < IN_BOX_COUNT; boxPos++)
{
struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos);
if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE)
@@ -3663,7 +3663,7 @@ static u8 SendMonToPC(struct Pokemon* mon)
}
boxNo++;
- if (boxNo == 14)
+ if (boxNo == TOTAL_BOXES_COUNT)
boxNo = 0;
} while (boxNo != StorageGetCurrentBox());