Skip to content

Commit

Permalink
If mapped file size is reported as zero, then throw as an empty file …
Browse files Browse the repository at this point in the history
…exception
  • Loading branch information
Blake-Madden committed May 31, 2024
1 parent 239f462 commit cee8411
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/memorymappedfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ bool MemoryMappedFile::MapFile(const wxString& filePath,
m_open = true;
return true;
}
else if (m_mapSize == 0)
{
Reset();
throw MemoryMappedFileEmptyException();
}
else
{
Reset();
Expand Down

0 comments on commit cee8411

Please sign in to comment.