WebAPI: Do not wrap result if offset is invalid

Closes #22158.
PR #22174.
This commit is contained in:
Bark 2025-02-18 07:53:30 +02:00 committed by GitHub
parent 1043bea896
commit ad9100ac07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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