GSDumpReplayer: Fix crash when downloading Z24 targets

e.g. Lego Racers 2
This commit is contained in:
Stenzek 2023-03-30 23:34:37 +10:00 committed by refractionpcsx2
parent d70334ee57
commit affc45e752
1 changed files with 2 additions and 1 deletions

View File

@ -329,7 +329,8 @@ void GSDumpReplayerCpuStep()
u32 size;
std::memcpy(&size, packet.data, sizeof(size));
std::unique_ptr<u8[]> arr(new u8[size * 16]);
// Allocate an extra quadword, some transfers write too much (e.g. Lego Racers 2 with Z24 downloads).
std::unique_ptr<u8[]> arr(new u8[(size + 1) * 16]);
GetMTGS().InitAndReadFIFO(arr.get(), size);
}
break;