13
0

Correct a couple of typos when calling 'g_fopen()'

This commit is contained in:
John Emmas 2023-01-17 10:32:36 +00:00
parent e66a757154
commit 7433ca7e8b
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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)