flush any cached changes before serializing

This commit is contained in:
Jorj Bauer 2020-06-28 08:29:26 -04:00
parent 94fc3f8077
commit 845a0f6175
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ const char *WozSerializer::diskName()
bool WozSerializer::Serialize(int8_t fd)
{
// FIXME: if trackDirty is set, we MUST flush first before exiting!
// If we're being asked to serialize, make sure we've flushed any data first
flush();
g_filemanager->writeByte(fd, WOZMAGIC);