diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-07-03 17:25:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 17:25:05 -0400 |
commit | 585d92f298e1edd8f756f8362de45c9fadc6fcab (patch) | |
tree | 2e3b17d37c4782f575329fc0fbe1f7bd406e6bad /src/union_room.c | |
parent | 558097f42326f19044a6351004468a46d6ee0b38 (diff) | |
parent | ff94d49a45ef605cfaed1268aa5a230958e25cd9 (diff) |
Merge pull request #445 from Kurausukun/ubfix
Port UBFIX Macro and Some Usages from Emerald
Diffstat (limited to 'src/union_room.c')
-rw-r--r-- | src/union_room.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/union_room.c b/src/union_room.c index 5fc8730e5..9b0a9263d 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1628,7 +1628,11 @@ static bool32 IsPartnerActivityAcceptable(u32 activity, u32 group) if (group == 0xFF) return TRUE; + #ifndef UBFIX if (group <= NELEMS(sAcceptedActivityIds)) // UB: <= may access data outside the array + #else + if (group < NELEMS(sAcceptedActivityIds)) + #endif { const u8 *bytes = sAcceptedActivityIds[group]; |