Skip to content

Commit

Permalink
fix: offset overflows in skip_chunks when file larger than 2GB
Browse files Browse the repository at this point in the history
  • Loading branch information
hlf20010508 authored and Lonami committed Jan 7, 2025
1 parent a3c1f6c commit 3d0b640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grammers-client/src/client/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl DownloadIter {
/// skip less data, modify the `chunk_size` before calling this method, and then reset it to
/// any value you want.
pub fn skip_chunks(mut self, n: i32) -> Self {
self.request.offset += (self.request.limit * n) as i64;
self.request.offset += self.request.limit as i64 * (n as i64);
self
}

Expand Down

0 comments on commit 3d0b640

Please sign in to comment.