Fix (?) the savestate bug in PSPSaveDialog/SaveDataParam

PSPSaveDialog::DoState called SetPspParam in non-READ modes, which could
modify it.
This commit is contained in:
Henrik Rydgård 2022-12-02 13:45:17 +01:00
parent f5a7661c51
commit f954013d0b

View File

@ -1255,7 +1255,7 @@ void PSPSaveDialog::DoState(PointerWrap &p) {
// Just reset it.
bool hasParam = param.GetPspParam() != NULL;
Do(p, hasParam);
if (hasParam) {
if (hasParam && p.mode == p.MODE_READ) {
param.SetPspParam(&request);
}
Do(p, requestAddr);