mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 12:32:52 +00:00
Flush all data before we save the MAGIC_NUMBER for each file in the backup process
This commit is contained in:
parent
edb4971b4c
commit
823ccb6b0c
@ -180,6 +180,10 @@ private:
|
||||
write32(s, 0); // Leave a room for the magic number
|
||||
(this->*writeMember)(s, obj); // Write the object
|
||||
|
||||
// Flush all data. In this way we ensure that the magic number is
|
||||
// the last thing being written in the file.
|
||||
s.flush();
|
||||
|
||||
// Write the magic number
|
||||
s.seekp(0);
|
||||
write32(s, MAGIC_NUMBER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user