mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-11-27 14:12:09 +00:00
- fixed file closing in standard MIDI file writer
source/zmusic/zmusic.cpp:506:2: warning: deleting pointer to incomplete type '__sFILE' may cause undefined behavior [-Wdelete-incomplete]
This commit is contained in:
parent
ba9e9da6e6
commit
e598ab7f1c
1 changed files with 1 additions and 1 deletions
|
@ -503,6 +503,6 @@ DLL_EXPORT zmusic_bool ZMusic_WriteSMF(MIDISource* source, const char *fn, int l
|
||||||
auto f = MusicIO::utf8_fopen(fn, "wt");
|
auto f = MusicIO::utf8_fopen(fn, "wt");
|
||||||
if (f == nullptr) return false;
|
if (f == nullptr) return false;
|
||||||
success = (fwrite(&midi[0], 1, midi.size(), f) == midi.size());
|
success = (fwrite(&midi[0], 1, midi.size(), f) == midi.size());
|
||||||
delete f;
|
fclose(f);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue