Allow loading of huge files

This commit is contained in:
WerWolv 2020-11-17 13:59:32 +01:00
parent e61dfa0927
commit 02c3821ea7
1 changed files with 4 additions and 4 deletions

View File

@ -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<std::pair<std::string, std::string>> FileProvider::getDataInformation() {