Skip to content

Commit

Permalink
Enable to open file in ReadWrite mode
Browse files Browse the repository at this point in the history
  • Loading branch information
OptionalAssistant committed Mar 29, 2024
1 parent 26afc59 commit f819408
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 f819408

Please sign in to comment.