diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 1e9dedce2..2975c059d 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -1227,9 +1227,9 @@ TORRENT_IPV6_NAMESPACE_END std::uint32_t id() const { uintptr_t ret = reinterpret_cast(m_torrent.lock().get()); - // a torrent object is about 1024 bytes, so - // it's safe to shift 11 bits - return std::uint32_t(ret >> 11); + // a torrent object is about 1024 (2^10) bytes, so + // it's safe to shift 10 bits + return std::uint32_t(ret >> 10); } // This function is intended only for use by plugins and the alert