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
1 changed files with 0 additions and 1 deletions

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_))
{