diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-03-19 17:01:31 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2021-03-21 13:43:14 -0500 |
commit | 28aff5b179d14aa8cb440d2f72c3e098482f6a75 (patch) | |
tree | f2c15a818ad671439b4386fece88ea1aaf796d25 /src/frontier_util.c | |
parent | 557152b06eab9320987f9c3b676b903141beb026 (diff) |
Correct ClearRankingHallRecords bugfix
Diffstat (limited to 'src/frontier_util.c')
-rw-r--r-- | src/frontier_util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/frontier_util.c b/src/frontier_util.c index 095c750a6..491aef936 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -2383,13 +2383,13 @@ 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 + // UB: Passing 0 as a pointer instead of a pointer holding a value of 0. +#ifdef UBFIX + u8 emptyId[TRAINER_ID_LENGTH] = {0}; + #define ZERO emptyId +#else #define ZERO 0 - #endif +#endif for (i = 0; i < HALL_FACILITIES_COUNT; i++) { |