fix bug when calling torrent_handle::queue_position_up() on the torrent at the top of the queue. #455

This commit is contained in:
Arvid Norberg 2009-01-05 18:45:05 +00:00
parent 52ee9342e9
commit 7df806d7f5
1 changed files with 2 additions and 1 deletions

View File

@ -328,7 +328,8 @@ namespace libtorrent
void torrent_handle::queue_position_up() const
{
INVARIANT_CHECK;
TORRENT_FORWARD(set_queue_position(t->queue_position() - 1));
TORRENT_FORWARD(set_queue_position(t->queue_position() == 0
? t->queue_position() : t->queue_position() - 1));
}
void torrent_handle::queue_position_down() const