fix torrent peer class index overflow (#1557)
fix peer class index width
This commit is contained in:
parent
3b9c65daf1
commit
a07ffe42f8
|
@ -1,3 +1,4 @@
|
|||
* fix per-torrent rate limits for >256 peer classes
|
||||
* don't load user_agent and peer_fingerprint from session_state
|
||||
* fix file rename issue with name prefix matching torrent name
|
||||
* fix division by zero when setting tick_interval > 1000
|
||||
|
|
|
@ -47,7 +47,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace libtorrent
|
||||
{
|
||||
typedef boost::uint8_t peer_class_t;
|
||||
typedef boost::uint32_t peer_class_t;
|
||||
|
||||
struct peer_class_info
|
||||
{
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace libtorrent
|
|||
}
|
||||
else
|
||||
{
|
||||
TORRENT_ASSERT(m_peer_classes.size() < 0x100000000);
|
||||
ret = m_peer_classes.size();
|
||||
m_peer_classes.push_back(boost::shared_ptr<peer_class>());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue