diff options
author | Vitaly Novichkov <Wohlstand@users.noreply.github.com> | 2019-02-11 15:38:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 15:38:40 +0300 |
commit | 4995b836e2fcceaebc6486c1a60a6d9bad36aaa5 (patch) | |
tree | 7cf16e7d5c921f5e65f57db507b6f13f9d204c63 /src/adlmidi_midiplay.cpp | |
parent | ce90247dcf72ea48a44cb1b733fc0634dbf6397b (diff) | |
parent | 2daa8d8061b471873c677651a41cea3e75ac12ae (diff) | |
download | libADLMIDI-4995b836e2fcceaebc6486c1a60a6d9bad36aaa5.tar.gz libADLMIDI-4995b836e2fcceaebc6486c1a60a6d9bad36aaa5.tar.bz2 libADLMIDI-4995b836e2fcceaebc6486c1a60a6d9bad36aaa5.zip |
Merge pull request #203 from jpcima/work
fix `describeChannels` iteration problem on the generic list structure
Diffstat (limited to 'src/adlmidi_midiplay.cpp')
-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] = '@'; } |