1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-21 23:32:35 +00:00

fix: 3579 assertion when RPC client asks for torrent-id 0 (#3683)

Fixes #3579.
This commit is contained in:
Charles Kerr 2022-08-20 11:55:32 -05:00 committed by GitHub
parent da3d83eaed
commit d2852b6043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,6 @@ struct CompareTorrentByHash
tr_torrent* tr_torrents::get(tr_torrent_id_t id)
{
TR_ASSERT(0 < id);
TR_ASSERT(static_cast<size_t>(id) < std::size(by_id_));
if (static_cast<size_t>(id) >= std::size(by_id_))
{