mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 22:33:34 -07:00
QList's mid returns an empty list if supplied limit/offset cause out-of-bound. So we dont need the condition.
This commit is contained in:
parent
876849cdc1
commit
52ed311d26
1 changed files with 0 additions and 4 deletions
|
@ -386,10 +386,6 @@ void TorrentsController::infoAction()
|
|||
// normalize offset
|
||||
if (offset < 0)
|
||||
offset = size + offset;
|
||||
if ((offset >= size) || (offset < 0)) {
|
||||
setResult(QJsonArray {});
|
||||
return;
|
||||
}
|
||||
// normalize limit
|
||||
if (limit <= 0)
|
||||
limit = -1; // unlimited
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue