From 2daa8d8061b471873c677651a41cea3e75ac12ae Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Mon, 11 Feb 2019 13:34:26 +0100 Subject: fix `describeChannels` iteration problem on the generic list structure --- src/adlmidi_midiplay.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/adlmidi_midiplay.cpp') 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] = '@'; } -- cgit v1.2.3