Skip to content

Commit

Permalink
GSDumpReplayer: Fix crash when downloading Z24 targets
Browse files Browse the repository at this point in the history
e.g. Lego Racers 2
  • Loading branch information
stenzek authored and refractionpcsx2 committed Mar 30, 2023
1 parent d70334e commit affc45e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pcsx2/GSDumpReplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit affc45e

Please sign in to comment.