diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index a559852e8..bf7304bf2 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -3269,7 +3269,7 @@ void print_hud_course_complete_coins(s16 x, s16 y) { gMarioStates[0].numLives++; } } else { - if (gCourseCompleteCoins % gLevelValues.numCoinsToLife == 0 && gCourseCompleteCoins > 0) { + if (gLevelValues.numCoinsToLife != 0 && gCourseCompleteCoins % gLevelValues.numCoinsToLife == 0 && gCourseCompleteCoins > 0) { play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource); gMarioStates[0].numLives++; } diff --git a/src/game/level_update.c b/src/game/level_update.c index 34e275981..b14fa4698 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -1121,7 +1121,7 @@ void update_hud_values(void) { play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource); } } else { - if (gHudDisplay.coins % gLevelValues.numCoinsToLife == 0 && gHudDisplay.coins > 0) { + if (gLevelValues.numCoinsToLife != 0 && gHudDisplay.coins % gLevelValues.numCoinsToLife == 0 && gHudDisplay.coins > 0) { gMarioState->numLives++; play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource); }