sys: Fixed non-existing files being created in Read mode
This commit is contained in:
parent
545604da63
commit
044e65eb20
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user