mirror of
https://github.com/transmission/transmission
synced 2025-03-08 21:04:25 +00:00
Fix infinite loop when searching for missing torrents by id (#7097)
This commit is contained in:
parent
7e60fb87ab
commit
7c7046be6e
1 changed files with 8 additions and 1 deletions
|
@ -622,7 +622,14 @@ std::pair<Glib::RefPtr<Torrent>, guint> Session::Impl::find_torrent_by_id(tr_tor
|
|||
return { torrent, position };
|
||||
}
|
||||
|
||||
(current_torrent_id < torrent_id ? begin_position : end_position) = position;
|
||||
if (current_torrent_id < torrent_id)
|
||||
{
|
||||
begin_position = position + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
end_position = position;
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Add table
Reference in a new issue