mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 02:45:32 +00:00
reject newer formats when scanning saved games
This commit is contained in:
parent
e3670cff8a
commit
55544e931c
2 changed files with 4 additions and 1 deletions
|
@ -27,6 +27,9 @@ void MWState::Character::addSlot (const boost::filesystem::path& path)
|
|||
ESM::ESMReader reader;
|
||||
reader.open (slot.mPath.string());
|
||||
|
||||
if (reader.getFormat()>ESM::Header::CurrentFormat)
|
||||
return; // format is too new -> ignore
|
||||
|
||||
if (reader.getRecName()!=ESM::REC_SAVE)
|
||||
return; // invalid save file -> ignore
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
|
|||
|
||||
std::ofstream stream (slot->mPath.string().c_str());
|
||||
ESM::ESMWriter writer;
|
||||
// writer.setFormat ();
|
||||
writer.setFormat (ESM::Header::CurrentFormat);
|
||||
writer.save (stream);
|
||||
writer.startRecord ("SAVE");
|
||||
slot->mProfile.save (writer);
|
||||
|
|
Loading…
Reference in a new issue