From 02c3821ea7101eeba9ec7c16b34baf0949967849 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 17 Nov 2020 13:59:32 +0100 Subject: [PATCH] Allow loading of huge files --- source/provider/file_provider.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/provider/file_provider.cpp b/source/provider/file_provider.cpp index 7d8a2cda3..d44a54c68 100644 --- a/source/provider/file_provider.cpp +++ b/source/provider/file_provider.cpp @@ -47,7 +47,7 @@ namespace hex::prv { if ((offset + size) > this->getSize() || buffer == nullptr || size == 0) return; - fseek(this->m_file, offset, SEEK_SET); + _fseeki64(this->m_file, offset, SEEK_SET); fread(buffer, 1, size, this->m_file); } @@ -55,13 +55,13 @@ namespace hex::prv { if (buffer == nullptr || size == 0) return; - fseek(this->m_file, offset, SEEK_SET); + _fseeki64(this->m_file, offset, SEEK_SET); fwrite(buffer, 1, size, this->m_file); } size_t FileProvider::getSize() { - fseek(this->m_file, 0, SEEK_END); - return ftell(this->m_file); + _fseeki64(this->m_file, 0, SEEK_END); + return _ftelli64(this->m_file); } std::vector> FileProvider::getDataInformation() {