forked from premiere/premiere-libtorrent
fixed assert when using checked iterators
This commit is contained in:
parent
182c917842
commit
df5a036066
|
@ -395,6 +395,9 @@ namespace libtorrent
|
||||||
#ifndef TORRENT_DISABLE_ENCRYPTION
|
#ifndef TORRENT_DISABLE_ENCRYPTION
|
||||||
buffer::interval wr_recv_buffer()
|
buffer::interval wr_recv_buffer()
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
if (m_recv_buffer.empty()) return buffer::interval(0,0);
|
||||||
|
#endif
|
||||||
return buffer::interval(&m_recv_buffer[0]
|
return buffer::interval(&m_recv_buffer[0]
|
||||||
, &m_recv_buffer[0] + m_recv_pos);
|
, &m_recv_buffer[0] + m_recv_pos);
|
||||||
}
|
}
|
||||||
|
@ -402,6 +405,9 @@ namespace libtorrent
|
||||||
|
|
||||||
buffer::const_interval receive_buffer() const
|
buffer::const_interval receive_buffer() const
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
if (m_recv_buffer.empty()) return buffer::interval(0,0);
|
||||||
|
#endif
|
||||||
return buffer::const_interval(&m_recv_buffer[0]
|
return buffer::const_interval(&m_recv_buffer[0]
|
||||||
, &m_recv_buffer[0] + m_recv_pos);
|
, &m_recv_buffer[0] + m_recv_pos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue