Fixed a bug in split_bitstring algo
[libcds.git] / cds / algo / split_bitstring.h
index b556ad03ca9ec853e3d85a2d42a05f176a6e4dfa..37cf2804ca77f3a13683c37a8783d314a2d13184 100644 (file)
@@ -45,9 +45,9 @@ namespace cds { namespace algo {
         split_bitstring( bitstring const& h, size_t nBitOffset )
             : m_ptr( reinterpret_cast<uint_type const*>( &h ) + nBitOffset / c_nBitPerInt )
             , m_pos( nBitOffset % c_nBitPerInt )
-            , m_first( m_ptr )
+            , m_first( reinterpret_cast<uint_type const*>(&h))
 #   ifdef _DEBUG
-            , m_last( m_ptr + c_nHashSize )
+            , m_last( m_first + c_nHashSize )
 #   endif
         {}