zero out work_buff before writing padding in save

This commit is contained in:
withmorten 2021-07-01 18:08:48 +02:00
parent a3964dfd4a
commit 2071abd295

View File

@ -220,6 +220,11 @@ GenericSave(int file)
WriteSaveDataBlock(CStreaming::MemoryCardSave); WriteSaveDataBlock(CStreaming::MemoryCardSave);
WriteSaveDataBlock(CPedType::Save); WriteSaveDataBlock(CPedType::Save);
// sure just write garbage data repeatedly ...
#ifndef THIS_IS_STUPID
memset(work_buff, 0, sizeof(work_buff));
#endif
// Write padding // Write padding
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
size = align4bytes(SIZE_OF_ONE_GAME_IN_BYTES - totalSize - 4); size = align4bytes(SIZE_OF_ONE_GAME_IN_BYTES - totalSize - 4);