prevent loading savestates that are too recent

This commit is contained in:
Arisotura 2019-06-12 12:49:52 +02:00
parent 27f758d353
commit 886bf6bc10
1 changed files with 6 additions and 1 deletions

View File

@ -110,7 +110,12 @@ Savestate::Savestate(const char* filename, bool save)
} }
fread(&VersionMinor, 2, 1, file); fread(&VersionMinor, 2, 1, file);
// TODO: handle it??? if (VersionMinor > SAVESTATE_MINOR)
{
printf("savestate: state from the future, %d > %d\n", VersionMinor, SAVESTATE_MINOR);
Error = true;
return;
}
buf = 0; buf = 0;
fread(&buf, 4, 1, file); fread(&buf, 4, 1, file);