mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
Merge pull request #2487 from pmzqla/webui-negativeoffset
WebUI: Fix negative offsets when requesting torrent list
This commit is contained in:
commit
3b677053c7
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@ QByteArray btjson::getTorrents(QString filter, QString label,
|
||||||
int size = torrent_list.size();
|
int size = torrent_list.size();
|
||||||
// normalize offset
|
// normalize offset
|
||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
offset = size - offset;
|
offset = size + offset;
|
||||||
if ((offset >= size) || (offset < 0))
|
if ((offset >= size) || (offset < 0))
|
||||||
offset = 0;
|
offset = 0;
|
||||||
// normalize limit
|
// normalize limit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue