Fix mistake from savestates breaking saving.

Clear after, not first.  Was killing the count.
This commit is contained in:
Unknown W. Brackets 2012-12-31 15:39:49 -08:00
parent cff6d155f1
commit ca4c767d38

View File

@ -500,6 +500,8 @@ int SavedataParam::SetPspParam(SceUtilitySavedataParam *param)
char (*saveNameListData)[20]; char (*saveNameListData)[20];
if (param->saveNameList != 0) if (param->saveNameList != 0)
{ {
Clear();
saveNameListData = (char(*)[20])Memory::GetPointer(param->saveNameList); saveNameListData = (char(*)[20])Memory::GetPointer(param->saveNameList);
// Get number of fileName in array // Get number of fileName in array
@ -509,7 +511,6 @@ int SavedataParam::SetPspParam(SceUtilitySavedataParam *param)
saveDataListCount++; saveDataListCount++;
} while(saveNameListData[saveDataListCount][0] != 0); } while(saveNameListData[saveDataListCount][0] != 0);
Clear();
saveDataList = new SaveFileInfo[saveDataListCount]; saveDataList = new SaveFileInfo[saveDataListCount];
// get and stock file info for each file // get and stock file info for each file