fixed bug in extension loop

This commit is contained in:
Arvid Norberg 2008-07-01 20:22:25 +00:00
parent af0ebb519c
commit b354e7e0d9
1 changed files with 2 additions and 2 deletions

View File

@ -1261,8 +1261,8 @@ namespace libtorrent
#endif
#ifndef TORRENT_DISABLE_EXTENSIONS
for (extension_list_t::iterator i = m_extensions.begin()
, end(m_extensions.end()); i != end;)
for (extension_list_t::iterator i = m_extensions.begin();
!m_extensions.empty() && i != m_extensions.end();)
{
// a false return value means that the extension
// isn't supported by the other end. So, it is removed.