From 1dc87a070464c3e1dd519fd7d92553939a7c0023 Mon Sep 17 00:00:00 2001 From: jjsat Date: Sat, 16 Dec 2017 16:12:25 +0100 Subject: [PATCH] Corrected logic for handling number of returned save data list entries and total number of save entries. --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index f5a81f3796..59a6a70575 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -120,9 +120,10 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version, if (entry.name.substr(0, prefix.size()) == prefix) { // Count the amount of matches and the amount of listed directories - if (listGet->dirListNum++ < setBuf->dirListMax) + listGet->dirNum++; // total number of directories + if (listGet->dirListNum < setBuf->dirListMax) { - listGet->dirNum++; + listGet->dirListNum++; // number of directories in list // PSF parameters const auto& psf = psf::load_object(fs::file(base_dir + entry.name + "/PARAM.SFO"));