From 65ca934452726ab8a667fe6a9c903489ddb67da9 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 17 Nov 2018 14:39:14 +0300 Subject: [PATCH] cellSaveData: fix truncation size (regression) --- 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 d4339514c8..1b8da125e8 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -815,7 +815,7 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version, // Write to memory file and truncate const u64 sr = file.seek(fileSet->fileOffset); const u64 wr = file.write(fileSet->fileBuf.get_ptr(), access_size); - file.trunc(wr); + file.trunc(sr + wr); fileGet->excSize = ::narrow(wr); all_times.erase(file_path); has_modified = true;