SaveState: Initialize some memory that is saved.
At the very least, will help them compress better. Also good not to leak random memory.
This commit is contained in:
parent
3090360692
commit
fd8a0612fa
8 changed files with 27 additions and 16 deletions
|
@ -300,7 +300,7 @@ CChunkFileReader::Error CChunkFileReader::SaveFile(const std::string &filename,
|
|||
}
|
||||
|
||||
// Create header
|
||||
SChunkHeader header;
|
||||
SChunkHeader header{};
|
||||
header.Compress = compressed_buffer ? 1 : 0;
|
||||
header.Revision = REVISION_CURRENT;
|
||||
header.ExpectedSize = (u32)write_len;
|
||||
|
@ -308,7 +308,7 @@ CChunkFileReader::Error CChunkFileReader::SaveFile(const std::string &filename,
|
|||
truncate_cpy(header.GitVersion, gitVersion);
|
||||
|
||||
// Setup the fixed-length title.
|
||||
char titleFixed[128];
|
||||
char titleFixed[128]{};
|
||||
truncate_cpy(titleFixed, title.c_str());
|
||||
|
||||
// Now let's start writing out the file...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue