MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / FixModifyingFunctions

Function FixModifyingFunctions

DLL/Mods/BugPrevention.cpp:119–123  ·  view source on GitHub ↗

Fixes crash when modifying functions in Rocksmith.

Source from the content-addressed store, hash-verified

117 /// Fixes crash when modifying functions in Rocksmith.
118 /// </summary>
119 void FixModifyingFunctions() {
120 uintptr_t forceSuccessLSBOffset = Offsets::ptr_ModdedPtrCrashFix.Get() + 0x3; // LSB of the MOV is what we are replacing
121 byte forceFailedLSB = MemUtil::ReadValue<byte>(forceSuccessLSBOffset + 0x14, true); // We are replacing it with ForceFailed LSB, which is 0x14 away
122 MemUtil::PatchAdr(forceSuccessLSBOffset, (LPVOID)&forceFailedLSB, 1, true);
123 }
124}

Callers 1

InitializeModsFunction · 0.85

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected