Saveload: Fix upstream chunk load state not be cleared before load

This commit is contained in:
Jonathan G Rennison
2023-03-07 18:12:11 +00:00
parent 8dca681c8c
commit 2acc00ab13
2 changed files with 9 additions and 0 deletions

View File

@@ -101,6 +101,7 @@ namespace upstream_sl {
void SlFixPointers();
void SlFixPointerChunkByID(uint32 id);
void SlSaveChunkChunkByID(uint32 id);
void SlResetLoadState();
}
/** What are we currently doing? */
@@ -3516,6 +3517,8 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
_sl.reader = new ReadBuffer(_sl.lf);
_next_offs = 0;
upstream_sl::SlResetLoadState();
if (!load_check) {
ResetSaveloadData();