Set savegame error code if failed to open for load

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis
2025-03-15 14:06:36 +02:00
committed by Stefanos Kornilios Mitsis Poiitidis
parent d7af07d549
commit 6208a13bd6
2 changed files with 2 additions and 0 deletions

View File

@@ -286,6 +286,7 @@ GenericLoad()
CPad::ResetCheats();
file = CFileMgr::OpenFile(LoadFileName, "rb");
if (file == 0) {
PcSaveHelper.nErrorCode = SAVESTATUS_ERR_LOAD_OPEN;
return false;
}
size = C_PcSave::PcClassLoadRoutine(file, work_buff);

View File

@@ -319,6 +319,7 @@ GenericLoad()
file = CFileMgr::OpenFile(LoadFileName, "rb");
if (file == 0) {
PcSaveHelper.nErrorCode = SAVESTATUS_ERR_LOAD_OPEN;
return false;
}
size = C_PcSave::PcClassLoadRoutine(file, work_buff);