PR review fixes (#384)

This commit is contained in:
Ken Van Hoeylandt
2025-10-25 13:47:43 +02:00
committed by GitHub
parent f660550f86
commit d0d05c67ca
12 changed files with 56 additions and 28 deletions
+2 -3
View File
@@ -16,10 +16,9 @@ bool ObjectFileWriter::open() {
}
// Edit existing or create a new file
auto* mode = edit_existing ? "r+" : "w";
auto opening_file = std::unique_ptr<FILE, FileCloser>(std::fopen(filePath.c_str(), mode));
auto opening_file = std::unique_ptr<FILE, FileCloser>(std::fopen(filePath.c_str(), "wb"));
if (opening_file == nullptr) {
TT_LOG_E(TAG, "Failed to open file %s in %s mode", filePath.c_str(), mode);
TT_LOG_E(TAG, "Failed to open file %s", filePath.c_str());
return false;
}