From 17e6ad1fe817d61d625ee14c1ce4846bfb7276c9 Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Wed, 12 Apr 2023 03:26:44 +0200 Subject: [PATCH] Fix deref in cellSaveData log --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index 94fb5b06b1..f8f02ed820 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -1841,7 +1841,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v if (file == all_files.cend() || file->second.size() <= fileSet->fileOffset) { - cellSaveData.error("Failed to open file %s%s (size=%d, fileOffset=%d)", dir_path, file_path, file->second.size(), fileSet->fileOffset); + cellSaveData.error("Failed to open file %s%s (size=%d, fileOffset=%d)", dir_path, file_path, file == all_files.cend() ? -1 : file->second.size(), fileSet->fileOffset); savedata_result = CELL_SAVEDATA_ERROR_FAILURE; break; }