From 28aff5b179d14aa8cb440d2f72c3e098482f6a75 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 19 Mar 2021 17:01:31 -0400 Subject: [PATCH] Correct ClearRankingHallRecords bugfix --- src/frontier_util.c | 12 ++++++------ 1 file 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++) {