[buffer] Add assertions checking segments indexes >= 0 in buffered_piece_collection.

This commit is contained in:
Adam Wulkiewicz
2015-02-16 18:12:06 +01:00
parent 2e87e7008e
commit 2d3bfc296c

View File

@@ -807,6 +807,9 @@ struct buffered_piece_collection
{
pc.offsetted_count = pc.last_segment_index - pc.first_seg_id.segment_index;
BOOST_ASSERT(pc.offsetted_count >= 0);
BOOST_ASSERT(pc.first_seg_id.multi_index >= 0);
BOOST_ASSERT(pc.first_seg_id.segment_index >= 0);
BOOST_ASSERT(pc.last_segment_index >= 0);
pc.robust_ring.reserve(pc.offsetted_count + helper_points_size);