- 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:
alexey.lysiuk 2021-03-19 10:04:41 +02:00
parent ba9e9da6e6
commit e598ab7f1c

View file

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