diff --git a/src/game/save_file.c b/src/game/save_file.c index f1d5b48e..c2c52ae4 100644 --- a/src/game/save_file.c +++ b/src/game/save_file.c @@ -723,7 +723,17 @@ s32 save_file_get_course_coin_score(s32 fileIndex, s32 courseIndex) { if (INVALID_FILE_INDEX(fileIndex)) { return 0; } if (INVALID_SRC_SLOT(gSaveFileUsingBackupSlot)) { return 0; } if (INVALID_COURSE_COIN_INDEX(courseIndex)) { return 0; } - return gSaveBuffer.files[fileIndex][gSaveFileUsingBackupSlot].courseCoinScores[courseIndex]; + u8 coinScore = gSaveBuffer.files[fileIndex][gSaveFileUsingBackupSlot].courseCoinScores[courseIndex]; + + // sanity check - if we've collected 100 coin star... we have to have had at least 100 + if (coinScore < 100) { + u8 stars = save_file_get_star_flags(fileIndex, courseIndex); + if ((stars & (1 << 6))) { + coinScore = 100; + } + } + + return coinScore; } void save_file_set_course_coin_score(s32 fileIndex, s32 courseIndex, u8 coinScore) { diff --git a/src/menu/star_select.c b/src/menu/star_select.c index 986e54f7..68690194 100644 --- a/src/menu/star_select.c +++ b/src/menu/star_select.c @@ -97,7 +97,7 @@ void bhv_act_selector_star_type_loop(void) { * Renders the 100 coin star with an special star selector type. */ void render_100_coin_star(u8 stars) { - if ((stars & (1 << 6)) && sStarSelectorModels[6]) { + if ((stars & (1 << 6))) { // If the 100 coin star has been collected, create a new star selector next to the coin score. sStarSelectorModels[6] = spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_STAR, bhvActSelectorStarType, 370, 24, -300, 0, 0, 0);