From a62f7a63f9009943d67c2ddf2e783d2cde64140d Mon Sep 17 00:00:00 2001 From: defacube <85292886+yoyeet961@users.noreply.github.com> Date: Sat, 21 Oct 2023 03:19:52 +1100 Subject: [PATCH] Fix crashes when pausing in certain invalid acts of levels (e.g. act 65400 of TTM) (#480) * Fix crashes when pausing in certain invalid acts of levels (e.g. act 65400 of TTM) * Cap the player's act number at ?-6 (unless the number is 99) * Removed the original changes (because they're useless) * Remove the old changes again * Use PeachyPeach's suggestion * Remove useless include * Update ingame_menu.c --- src/game/ingame_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index e9673a5a..653420ba 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -2570,7 +2570,7 @@ void render_pause_my_score_coins(void) { print_generic_string(CRS_NUM_X1, 157, strCourseNum); #endif - if (gDialogCourseActNum >= 1 && gCurrActNum <= 6) { + if (gDialogCourseActNum >= 1 && gDialogCourseActNum <= 6) { actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]); } @@ -3668,4 +3668,4 @@ void set_dialog_override_color(u8 bgR, u8 bgG, u8 bgB, u8 bgA, u8 textR, u8 text void reset_dialog_override_color() { gOverrideDialogColor = 0; -} \ No newline at end of file +}