When resetting save game, write non-zeros so that it doesn't end up sparse when copied to a hard drive.

This commit is contained in:
Martin Haye 2021-02-27 08:26:37 -08:00
parent e9c161b010
commit 0b6f395781

View File

@ -4471,7 +4471,9 @@ end
// Create empty save file
newSave.withOutputStream { outStream ->
// First, a big block for copying the small-object heap
(1..SAVE_GAME_BYTES).each { outStream.write( (byte) 0) }
// Per Peter Ferrie, it's necessary to write non-zeros here, so that
// when copied to a hard drive it doesn't end up as a sparse file.
(1..SAVE_GAME_BYTES).each { outStream.write( (byte) 0xbb) }
// Followed by empty automap marks
// Header: size of remaining marks data