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
This commit is contained in:
defacube 2023-10-21 03:19:52 +11:00 committed by GitHub
parent 9ca0ba8c39
commit dde0991843
1 changed files with 2 additions and 2 deletions

View File

@ -2570,7 +2570,7 @@ void render_pause_my_score_coins(void) {
print_generic_string(CRS_NUM_X1, 157, strCourseNum); print_generic_string(CRS_NUM_X1, 157, strCourseNum);
#endif #endif
if (gDialogCourseActNum >= 1 && gCurrActNum <= 6) { if (gDialogCourseActNum >= 1 && gDialogCourseActNum <= 6) {
actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]); actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]);
} }