From 7433ca7e8b87c7b445488a8e4e60301a21039568 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Tue, 17 Jan 2023 10:32:36 +0000 Subject: [PATCH] Correct a couple of typos when calling 'g_fopen()' --- libs/evoral/SMF.cc | 4 ++-- libs/evoral/SMFReader.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/evoral/SMF.cc b/libs/evoral/SMF.cc index 6889073bf3..0f76bbd4fa 100644 --- a/libs/evoral/SMF.cc +++ b/libs/evoral/SMF.cc @@ -260,7 +260,7 @@ SMF::create(const std::string& path, int track, uint16_t ppqn) { /* put a stub file on disk */ - FILE* f = g_fopen (path.c_str(), "wb+"); + FILE* f = g_fopen (path.c_str(), "w+b"); if (f == 0) { return -1; } @@ -513,7 +513,7 @@ SMF::end_write(string const & path) return; } - FILE* f = g_fopen (path.c_str(), "wb+"); + FILE* f = g_fopen (path.c_str(), "w+b"); if (f == 0) { throw FileError (path); } diff --git a/libs/evoral/SMFReader.cc b/libs/evoral/SMFReader.cc index d207ccf328..b0350e7956 100644 --- a/libs/evoral/SMFReader.cc +++ b/libs/evoral/SMFReader.cc @@ -59,7 +59,7 @@ SMFReader::open(const string& filename) throw (logic_error, UnsupportedTime) cout << "Opening SMF file " << filename << " for reading." << endl; - _fd = g_fopen(filename.c_str(), "rb+"); + _fd = g_fopen(filename.c_str(), "r+b"); if (_fd) { // Read type (bytes 8..9)