diff options
Diffstat (limited to 'src/frontier_util.c')
-rw-r--r-- | src/frontier_util.c | 14 |
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; |