mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-30 16:01:51 +00:00
fix buffer overrun during channel disabled check (#358)
This commit is contained in:
parent
5001945979
commit
124a5b71bc
1 changed files with 2 additions and 4 deletions
|
@ -1831,8 +1831,7 @@ fluid_synth_all_notes_off(fluid_synth_t* synth, int chan)
|
|||
result = FLUID_FAILED;
|
||||
else
|
||||
{
|
||||
/* Allowed only on MIDI channel enabled */
|
||||
FLUID_API_RETURN_IF_CHAN_DISABLED(FLUID_FAILED);
|
||||
/* Allowed (even for channel disabled) as chan = -1 selects all channels */
|
||||
result = fluid_synth_all_notes_off_LOCAL (synth, chan);
|
||||
}
|
||||
FLUID_API_RETURN(result);
|
||||
|
@ -1874,8 +1873,7 @@ fluid_synth_all_sounds_off(fluid_synth_t* synth, int chan)
|
|||
result = FLUID_FAILED;
|
||||
else
|
||||
{
|
||||
/* Allowed only on MIDI channel enabled */
|
||||
FLUID_API_RETURN_IF_CHAN_DISABLED(FLUID_FAILED);
|
||||
/* Allowed (even for channel disabled) as chan = -1 selects all channels */
|
||||
result = fluid_synth_all_sounds_off_LOCAL (synth, chan);
|
||||
}
|
||||
FLUID_API_RETURN(result);
|
||||
|
|
Loading…
Reference in a new issue