Skip to content

Commit

Permalink
Update file handling
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Dec 10, 2024
1 parent 4013b22 commit d2c7729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/s2psimh/s2psimh_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int S2pSimh::Run(span<char*> args)
return EXIT_SUCCESS;
}

simh_file.open(simh_filename, ios::in | ios::out | ios::binary);
simh_file.open(simh_filename, (meta_data.empty() ? ios::in : ios::out) | ios::binary);
if (simh_file.fail()) {
cerr << "Error: Can't open '" << simh_filename << "':" << strerror(errno) << endl;
return EXIT_FAILURE;
Expand Down

0 comments on commit d2c7729

Please sign in to comment.