diff --git a/src/Mass/Mass.cpp b/src/Mass/Mass.cpp index a1a8109..3a42e54 100644 --- a/src/Mass/Mass.cpp +++ b/src/Mass/Mass.cpp @@ -106,6 +106,10 @@ void Mass::refreshValues() { } } + if(_mass->saveType() != "/Game/Core/Save/bpSaveGameUnit.bpSaveGameUnit_C"_s) { + Utility::Error{} << _filename << "is not a valid unit save."; + } + auto unit_data = _mass->at("UnitData"_s); if(!unit_data) { Utility::Error{} << "Couldn't find unit data in" << _filename; diff --git a/src/Profile/Profile.cpp b/src/Profile/Profile.cpp index c65fa6d..5e3a65f 100644 --- a/src/Profile/Profile.cpp +++ b/src/Profile/Profile.cpp @@ -106,6 +106,10 @@ void Profile::refreshValues() { return; } + if(_profile.saveType() != "/Game/Core/Save/bpSaveGameProfile.bpSaveGameProfile_C"_s) { + Utility::Error{} << _filename << "is not a valid profile save."; + } + auto name_prop = _profile.at("CompanyName"_s); if(!name_prop) { _lastError = "No company name in "_s + _filename;