diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2019-02-11 13:34:26 +0100 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2019-02-11 13:34:26 +0100 |
commit | 2daa8d8061b471873c677651a41cea3e75ac12ae (patch) | |
tree | 7cf16e7d5c921f5e65f57db507b6f13f9d204c63 | |
parent | ce90247dcf72ea48a44cb1b733fc0634dbf6397b (diff) | |
download | libADLMIDI-2daa8d8061b471873c677651a41cea3e75ac12ae.tar.gz libADLMIDI-2daa8d8061b471873c677651a41cea3e75ac12ae.tar.bz2 libADLMIDI-2daa8d8061b471873c677651a41cea3e75ac12ae.zip |
fix `describeChannels` iteration problem on the generic list structure
-rw-r--r-- | src/adlmidi_midiplay.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 011f74a..f1a0c56 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1898,11 +1898,14 @@ void MIDIplay::describeChannels(char *str, char *attr, size_t size) const AdlChannel &adlChannel = m_chipChannels[index]; AdlChannel::const_users_iterator loc = adlChannel.users.begin(); - if(loc.is_end()) // off + AdlChannel::const_users_iterator locnext(loc); + if(!loc.is_end()) ++locnext; + + if(loc.is_end()) // off { str[index] = '-'; } - else if(loc->next) // arpeggio + else if(!locnext.is_end()) // arpeggio { str[index] = '@'; } |