Skip to content

Channel::addBan(): fix iteration with erase() being done

Doing ++it on loop step when it already holds pointer to the next item due to holding the return value of the erase() results in skipping the item behind the erased one (and risks stepping behind the end). The (it == m_BanList.end()) check tried to catch at least the latter, but is missing the earlier. Patch introduces the usual logic for iterating with erase()

@psn @hein @argonel @buschinski

Edited by Friedrich W. H. Kossebau

Merge request reports

Loading