Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio_seqplayer.c cleanup #1274

Merged
merged 16 commits into from
Jun 21, 2022
Prev Previous commit
Next Next commit
Edit comment
engineer124 committed Jun 15, 2022
commit 118eaeaeb5d5542e265f170fedc14096acc90674
4 changes: 2 additions & 2 deletions src/code/audio_seqplayer.c
Original file line number Diff line number Diff line change
@@ -1128,11 +1128,11 @@ void AudioSeq_SetInstrument(SequenceChannel* channel, u8 instId) {
} else if (instId == 0x7F) {
// Drums
channel->instOrWave = 0;
channel->instrument = (Instrument*)1; // This is being stored as a pointer, but never read from
channel->instrument = (Instrument*)1; // invalid pointer, never dereferenced
} else if (instId == 0x7E) {
// Sfxs
channel->instOrWave = 1;
channel->instrument = (Instrument*)2; // This is being stored as a pointer, but never read from
channel->instrument = (Instrument*)2; // invalid pointer, never dereferenced
} else {
// Instruments
if ((channel->instOrWave = AudioSeq_GetInstrument(channel, instId, &channel->instrument, &channel->adsr)) ==