Merge pull request #15562 from unknownbrackets/securemode

Savedata: Allow no key when not using SECURE modes
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2022-05-29 23:01:43 +02:00
commit c69dd2f2e4
1 file changed
+2 -2
+2 -2
View File
@@ -403,7 +403,7 @@ int SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &saveD
ERROR_LOG_REPORT(SCEUTILITY, "Savedata version requested on save: %d", param->secureVersion);
return SCE_UTILITY_SAVEDATA_ERROR_SAVE_PARAM;
} else if (param->secureVersion != 0) {
if (param->secureVersion != 1 && !HasKey(param)) {
if (param->secureVersion != 1 && !HasKey(param) && secureMode) {
ERROR_LOG_REPORT(SCEUTILITY, "Savedata version with missing key on save: %d", param->secureVersion);
return SCE_UTILITY_SAVEDATA_ERROR_SAVE_PARAM;
}
@@ -638,7 +638,7 @@ int SavedataParam::LoadSaveData(SceUtilitySavedataParam *param, const std::strin
ERROR_LOG_REPORT(SCEUTILITY, "Savedata version requested: %d", param->secureVersion);
return SCE_UTILITY_SAVEDATA_ERROR_LOAD_PARAM;
} else if (param->secureVersion != 0) {
if (param->secureVersion != 1 && !HasKey(param)) {
if (param->secureVersion != 1 && !HasKey(param) && secureMode) {
ERROR_LOG_REPORT(SCEUTILITY, "Savedata version with missing key: %d", param->secureVersion);
return SCE_UTILITY_SAVEDATA_ERROR_LOAD_PARAM;
}