Skip to content

Commit

Permalink
Merge Fix crash when opening a clip on 3258+ (mr-585)
Browse files Browse the repository at this point in the history
a6e3f6d - fix(five/editor): fix crash when opening a clip on 3258+
  • Loading branch information
prikolium-cfx committed Nov 1, 2024
2 parents 94e3b9d + a6e3f6d commit a0a8b06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/components/gta-streaming-five/src/PatchReplayLimits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ static void* InitializeIPLBuffer()
return result;
}

static constexpr uint32_t NewBufferSize = 1024;
static uint32_t NewIPLBuffer[NewBufferSize];

static HookFunction hookFunction([]()
{
// CPacketIPL seems to be deprecated and CPacketIPL2 was added instead
if (xbr::IsGameBuildOrGreater<3258>())
{
static const constexpr uint32_t NewBufferSize = 1024;
static uint32_t* NewIPLBuffer = (uint32_t*)hook::AllocateStubMemory((size_t)NewBufferSize);

// Relocate CPacketIPL2 buffer references; stubs from 3258
RelocateRelative((void*)&NewIPLBuffer, {
RelocateRelative((void*)NewIPLBuffer, {
{ "48 8D 15 ? ? ? ? 48 8D 4C 24 ? 48 89 5C 24 ? 89 5C 24 ? E8 ? ? ? ? 48 8D 54 24", 3 },
{ "48 8D 0D ? ? ? ? 49 C1 E0 ? E8 ? ? ? ? 89 1D", 3 }
});
Expand Down

0 comments on commit a0a8b06

Please sign in to comment.