From faef90ba03251c964242b4acfb1534ff2df0b847 Mon Sep 17 00:00:00 2001 From: khizmax Date: Mon, 14 Mar 2016 23:17:10 +0300 Subject: [PATCH] Fixed a bug in erase_at() --- cds/intrusive/impl/feldman_hashset.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 (;;) { -- 2.34.1