Skip to content

Commit

Permalink
Merge pull request #120 from OptionalAssistant/master
Browse files Browse the repository at this point in the history
Enable to open file in ReadWrite mode
  • Loading branch information
ZehMatt authored Mar 29, 2024
2 parents cbb50a2 + f819408 commit 1b8b676
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zasm/src/core/filestream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ namespace zasm

FILE* fp = nullptr;
#ifdef _WIN32
_wfopen_s(&fp, path.wstring().c_str(), mode == StreamMode::Read ? L"rb" : L"wb");
_wfopen_s(&fp, path.wstring().c_str(), mode == StreamMode::Read ? L"rb" : mode == StreamMode::Write ? L"wb" : L"r+b");
#else
fp = fopen(path.string().c_str(), mode == StreamMode::Read ? "rb" : "wb");
fp = fopen(path.string().c_str(), mode == StreamMode::Read ? "rb" : mode == StreamMode::Write ? "wb" : "r+b");
#endif
if (fp == nullptr)
{
Expand Down

0 comments on commit 1b8b676

Please sign in to comment.