summaryrefslogtreecommitdiff
path: root/src/frontier_util.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-12-14 20:00:59 -0500
committerGitHub <noreply@github.com>2020-12-14 20:00:59 -0500
commit18a5feb413827ee5641e9a21e8e90ba0e9a90142 (patch)
tree5b486cd8f42cf734099c0e9a4a3aea37f33c30e6 /src/frontier_util.c
parent6dea3374d2277468828c71ef1fb083d85cdcd2ff (diff)
parentf7a729df3079041d3cc462a44919150f4ebdf19f (diff)
Merge pull request #1269 from GriffinRichards/bugfix
Use BUGFIX for some inline fixes
Diffstat (limited to 'src/frontier_util.c')
-rw-r--r--src/frontier_util.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/frontier_util.c b/src/frontier_util.c
index 83c9341d5..5955d9bf7 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -2383,13 +2383,21 @@ void ClearRankingHallRecords(void)
{
s32 i, j, k;
+ // BUG: Passing 0 as a pointer instead of a pointer holding a value of 0.
+ #ifdef BUGFIX
+ u8 zero = 0;
+ #define ZERO (&zero)
+ #else
+ #define ZERO 0
+ #endif
+
for (i = 0; i < HALL_FACILITIES_COUNT; i++)
{
for (j = 0; j < 2; j++)
{
for (k = 0; k < 3; k++)
{
- CopyTrainerId(gSaveBlock2Ptr->hallRecords1P[i][j][k].id, 0); // BUG: Passing 0 as a pointer instead of a pointer holding a value of 0.
+ CopyTrainerId(gSaveBlock2Ptr->hallRecords1P[i][j][k].id, ZERO);
gSaveBlock2Ptr->hallRecords1P[i][j][k].name[0] = EOS;
gSaveBlock2Ptr->hallRecords1P[i][j][k].winStreak = 0;
}
@@ -2400,8 +2408,8 @@ void ClearRankingHallRecords(void)
{
for (k = 0; k < 3; k++)
{
- CopyTrainerId(gSaveBlock2Ptr->hallRecords2P[j][k].id1, 0); // BUG: Passing 0 as a pointer instead of a pointer holding a value of 0.
- CopyTrainerId(gSaveBlock2Ptr->hallRecords2P[j][k].id2, 0); // BUG: Passing 0 as a pointer instead of a pointer holding a value of 0.
+ CopyTrainerId(gSaveBlock2Ptr->hallRecords2P[j][k].id1, ZERO);
+ CopyTrainerId(gSaveBlock2Ptr->hallRecords2P[j][k].id2, ZERO);
gSaveBlock2Ptr->hallRecords2P[j][k].name1[0] = EOS;
gSaveBlock2Ptr->hallRecords2P[j][k].name2[0] = EOS;
gSaveBlock2Ptr->hallRecords2P[j][k].winStreak = 0;