mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 22:33:34 -07:00
fix: Return error on requested unexisting offset instead of defaulting to 0 offset.
This commit is contained in:
parent
4686d6709e
commit
4a669237dd
1 changed files with 1 additions and 1 deletions
|
@ -387,7 +387,7 @@ void TorrentsController::infoAction()
|
|||
if (offset < 0)
|
||||
offset = size + offset;
|
||||
if ((offset >= size) || (offset < 0))
|
||||
offset = 0;
|
||||
throw APIError(APIErrorType::Conflict, tr("Offset is out of range"));
|
||||
// normalize limit
|
||||
if (limit <= 0)
|
||||
limit = -1; // unlimited
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue