From 5eea3d39cd50955e62904d146f67f65dc001b735 Mon Sep 17 00:00:00 2001 From: cawtds <38510667+cawtds@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:53:05 +0200 Subject: [PATCH] UB fix ClockwiseWipe_TopRight --- src/battle_transition.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/battle_transition.c b/src/battle_transition.c index 11f9cddf4bb5..c23578e60817 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -1907,7 +1907,11 @@ static bool8 ClockwiseWipe_TopRight(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; +#ifdef UBFIX + InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, 0, 1, 1); +#else InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, -1, 1, 1); +#endif do { gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (sTransitionData->tWipeCurrX + 1) | ((DISPLAY_WIDTH / 2) << 8);