diff --git a/gtk/Session.cc b/gtk/Session.cc index 5327a21c9..e6c8a976e 100644 --- a/gtk/Session.cc +++ b/gtk/Session.cc @@ -622,7 +622,14 @@ std::pair, 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 {};