mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-11-23 12:22:30 +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");
|
||||
if (f == nullptr) return false;
|
||||
success = (fwrite(&midi[0], 1, midi.size(), f) == midi.size());
|
||||
delete f;
|
||||
fclose(f);
|
||||
return success;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue