mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
sys: Fixed non-existing files being created in Read mode
This commit is contained in:
@@ -9,7 +9,7 @@ namespace hex {
|
||||
else if (mode == File::Mode::Write)
|
||||
this->m_file = fopen64(path.c_str(), "r+b");
|
||||
|
||||
if (mode == File::Mode::Create || this->m_file == nullptr)
|
||||
if (mode == File::Mode::Create || (mode == File::Mode::Write && this->m_file == nullptr))
|
||||
this->m_file = fopen64(path.c_str(), "w+b");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user