cellSaveData: followup to #7652

This commit is contained in:
Eladash 2020-03-01 19:00:04 +02:00 committed by Ivan
parent b05b16aedc
commit 7dfd50d5cc

View File

@ -1414,7 +1414,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
const auto dotpos = std::find_end(fileName, termpos, name, name + 1);
if (dotpos != termpos && (dotpos > fileName + 8 || termpos - dotpos > 4))
if (dotpos > fileName + 8 || termpos - dotpos > 4)
{
// ****** sysutil savedata parameter error : 70 ******
savedata_result = {CELL_SAVEDATA_ERROR_PARAM, "70"};
@ -1439,7 +1439,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
}
}
if (dotpos != termpos)
if (dotpos < termpos - 1)
{
// Reset for file extension
std::memset(name, 0, 5);