mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
Avoid UB on ocarinaAction shifts (#809)
This commit is contained in:
parent
37afdbd84c
commit
660897ff63
@ -2237,14 +2237,14 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
||||
}
|
||||
} else {
|
||||
osSyncPrintf("Na_StartOcarinaSinglePlayCheck2( message->ocarina_no );\n");
|
||||
func_800ECC04((1 << msgCtx->ocarinaAction) + 0x8000);
|
||||
func_800ECC04((1 << (msgCtx->ocarinaAction % 32)) + 0x8000);
|
||||
}
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_PLAYING;
|
||||
} else if (msgCtx->msgMode == MSGMODE_SONG_DEMONSTRATION_STARTING) {
|
||||
msgCtx->stateTimer = 20;
|
||||
msgCtx->msgMode = MSGMODE_SONG_DEMONSTRATION_SELECT_INSTRUMENT;
|
||||
} else {
|
||||
func_800ECC04((1 << (msgCtx->ocarinaAction + 0x11)) + 0x8000);
|
||||
func_800ECC04((1 << ((msgCtx->ocarinaAction + 0x11) % 32)) + 0x8000);
|
||||
// "Performance Check"
|
||||
osSyncPrintf("演奏チェック=%d\n", msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET);
|
||||
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK;
|
||||
|
Loading…
Reference in New Issue
Block a user