From: khizmax Date: Mon, 14 Mar 2016 20:17:10 +0000 (+0300) Subject: Fixed a bug in erase_at() X-Git-Tag: v2.2.0~356 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=faef90ba03251c964242b4acfb1534ff2df0b847;p=libcds.git Fixed a bug in erase_at() --- diff --git a/cds/intrusive/impl/feldman_hashset.h b/cds/intrusive/impl/feldman_hashset.h index 936b5a22..8b26b28f 100644 --- a/cds/intrusive/impl/feldman_hashset.h +++ b/cds/intrusive/impl/feldman_hashset.h @@ -1155,9 +1155,11 @@ namespace cds { namespace intrusive { { if ( iter.m_set != this ) return false; - if ( iter.m_pNode == head() && iter.m_idx >= head_size()) - return false; - if ( iter.m_idx >= array_node_size()) + if ( iter.m_pNode == head()) { + if ( iter.m_idx >= head_size()) + return false; + } + else if ( iter.m_idx >= array_node_size()) return false; for (;;) {