From ad9100ac073b2a031203b774a7066190aa32b84f Mon Sep 17 00:00:00 2001 From: Bark <32035685+userwiths@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:53:30 +0200 Subject: [PATCH] WebAPI: Do not wrap result if offset is invalid Closes #22158. PR #22174. --- src/webui/api/torrentscontroller.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 324bb89d6..6fd5f6fbf 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -421,8 +421,6 @@ void TorrentsController::infoAction() // normalize offset if (offset < 0) offset = size + offset; - if ((offset >= size) || (offset < 0)) - offset = 0; // normalize limit if (limit <= 0) limit = -1; // unlimited