From 52ed311d265913b2bf58f112d2afe5f2c2c346e3 Mon Sep 17 00:00:00 2001 From: "Stiliyan Tonev (Bark)" Date: Mon, 27 Jan 2025 14:44:55 +0200 Subject: [PATCH] QList's mid returns an empty list if supplied limit/offset cause out-of-bound. So we dont need the condition. --- src/webui/api/torrentscontroller.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 4e7bc5094..2a300752b 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -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