diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-26 20:50:24 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-26 20:50:24 +0100 |
| commit | f144f14d9c13f58afdcc86210824b25d9bf13a12 (patch) | |
| tree | c04de1c77020eaa0f0b52d5e4d5b90b13d6553da /src/LargeFileStream.cpp | |
| parent | 0fa6b682f5fcc63d3b212eeb52d998d0e33062ba (diff) | |
Improve parsing data type
Diffstat (limited to 'src/LargeFileStream.cpp')
| -rw-r--r-- | src/LargeFileStream.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LargeFileStream.cpp b/src/LargeFileStream.cpp index 86e2dcf..95e7c1c 100644 --- a/src/LargeFileStream.cpp +++ b/src/LargeFileStream.cpp @@ -23,7 +23,7 @@ void LargeFileStream::ReadNextChunk() { last_read_size = file.gcount(); } -char LargeFileStream::operator[](long loc) { +char LargeFileStream::operator[](ull loc) { // Perform various checks if (eof) { throw ReadToFar(); @@ -42,11 +42,11 @@ char LargeFileStream::operator[](long loc) { } // Goto the right memory chuck - long loc_chunk_count = loc / BUFFER_SIZE; + ull loc_chunk_count = loc / BUFFER_SIZE; while (chuck_count < loc_chunk_count) { ReadNextChunk(); } - long offset = loc - (loc_chunk_count * BUFFER_SIZE); + ull offset = loc - (loc_chunk_count * BUFFER_SIZE); // Ensure for EOF if (!file && offset >= last_read_size) { |
