1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 04:54:18 +00:00

Merge pull request #2487 from pmzqla/webui-negativeoffset

WebUI: Fix negative offsets when requesting torrent list
This commit is contained in:
sledgehammer999 2015-02-12 16:06:29 +02:00
commit 3b677053c7

View File

@ -256,7 +256,7 @@ QByteArray btjson::getTorrents(QString filter, QString label,
int size = torrent_list.size();
// normalize offset
if (offset < 0)
offset = size - offset;
offset = size + offset;
if ((offset >= size) || (offset < 0))
offset = 0;
// normalize limit