From 9a91518b9afe8b834a6893a668ecd5317258e15e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 30 Oct 2011 06:13:34 +0000 Subject: [PATCH] add assert in web_peer_connection --- src/web_peer_connection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/web_peer_connection.cpp b/src/web_peer_connection.cpp index 2606c39a7..f2f8f2cb5 100644 --- a/src/web_peer_connection.cpp +++ b/src/web_peer_connection.cpp @@ -710,6 +710,7 @@ namespace libtorrent incoming_piece(r, recv_buffer.begin); m_requests.pop_front(); if (associated_torrent().expired()) return; + TORRENT_ASSERT(m_block_pos >= r.length); m_block_pos -= r.length; m_received_body += r.length; TORRENT_ASSERT(receive_buffer().begin + m_body_start == recv_buffer.begin);