diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-08-02 20:19:37 +0200 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-08-02 20:32:54 +0200 |
commit | d8394a61e0bf71b41851b4fdf2094ac2614204e0 (patch) | |
tree | 17cff6aedb6297eb8664513ec520b350b1c89411 /src/adlmidi.cpp | |
parent | 9395426e07706546f31c7b0f4e79ca01be5b037d (diff) | |
download | libADLMIDI-d8394a61e0bf71b41851b4fdf2094ac2614204e0.tar.gz libADLMIDI-d8394a61e0bf71b41851b4fdf2094ac2614204e0.tar.bz2 libADLMIDI-d8394a61e0bf71b41851b4fdf2094ac2614204e0.zip |
add safety check for emulator switching
Diffstat (limited to 'src/adlmidi.cpp')
-rw-r--r-- | src/adlmidi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp index ab0c0c4..c7c5cf3 100644 --- a/src/adlmidi.cpp +++ b/src/adlmidi.cpp @@ -613,7 +613,7 @@ ADLMIDI_EXPORT int adl_switchEmulator(struct ADL_MIDIPlayer *device, int emulato assert(play); if(!play) return -1; - if((emulator >= 0) && (emulator < ADLMIDI_EMU_end)) + if(adl_isEmulatorAvailable(emulator)) { play->m_setup.emulator = emulator; play->partialReset(); |