mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-01-31 00:48:39 -06:00
sys: Catch error produced in file size querying
This commit is contained in:
@@ -103,9 +103,12 @@ namespace hex {
|
||||
|
||||
auto startPos = ftello64(this->m_file);
|
||||
fseeko64(this->m_file, 0, SEEK_END);
|
||||
size_t size = ftello64(this->m_file);
|
||||
auto size = ftello64(this->m_file);
|
||||
fseeko64(this->m_file, startPos, SEEK_SET);
|
||||
|
||||
if (size < 0)
|
||||
return 0;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user